ImageView



  • I have an ImageView, it needs to be photographed so that if the picture is taken in a vertical orientation, the fields remain left and right (figure 1), and if horizontally, down and above (Fig.2). How can you do that? Is there any special scaleType for that?

    Figure 1:

    введите сюда описание изображения

    Figure 2:

    введите сюда описание изображения



  • According to the https://developer.android.com/reference/android/widget/ImageView.ScaleType.html for your purposes,

    android:scaleType="fitCenter" //В xml
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2