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 ImageView
with android:layout_height="match_parent"
and android:layout_width="match_parent"
inside ImageSwitcher
. If you want to set scaleType, set it to those ImageView
s.
If you are using in code, then set LayoutParams to the ImageView
with ViewGroup.MATCH_PARENT
in your ViewFactory
, then ImageView.setScaleType()
if you want.