android: stretch image in imageview to fit screen

后端 未结 9 1131
一向
一向 2020-12-02 05:37

I have an imageview that has its height and width set to fill_parent with a linearlayout that has the same values set. So I suppose th

9条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-02 06:14

    to change pro-grammatically use :

    imgview.setScaleType(ScaleType.FIT_XY);
    

    OR

    to change from xml use:

     android:scaleType="fitXY"
    

提交回复
热议问题