0

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"
mad_lad
  • 654
  • 3
  • 8
  • 20
Dark Night
  • 77
  • 8

1 Answers1

0

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 ImageViews.

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.

Ananta Raha
  • 1,011
  • 5
  • 14