Scaling an image to max available width, keeping aspect ratio and avoiding ImageView extra space

后端 未结 6 2076
后悔当初
后悔当初 2021-02-04 03:07

I have this simple layout XML, and a green_square.png file which is 30X30 pixels




        
6条回答
  •  清酒与你
    2021-02-04 03:58

    It's so simple. Just make the width fill_parent and height wrap_content. Here is the I figured it out.

    
    

提交回复
热议问题