I want to add multiple photos so I used ImageSwitcher.
But I want the image to Fit the layout width and height, I tried fitxy like ImageView but it didn't work is there any way to do it?
android:scaleType="fitXY"
I want to add multiple photos so I used ImageSwitcher.
But I want the image to Fit the layout width and height, I tried fitxy like ImageView but it didn't work is there any way to do it?
android:scaleType="fitXY"
If you are using in xml, put
ImageViewwithandroid:layout_height="match_parent"andandroid:layout_width="match_parent"insideImageSwitcher. If you want to set scaleType, set it to thoseImageViews.If you are using in code, then set LayoutParams to the
ImageViewwithViewGroup.MATCH_PARENTin yourViewFactory, thenImageView.setScaleType()if you want.