Unwanted padding around an ImageView

前端 未结 8 801
闹比i
闹比i 2020-12-02 05:20

I need to include a header graphic in all of my activities/views. The file with the header is called header.xml:



        
8条回答
  •  独厮守ぢ
    2020-12-02 05:47

    finally!

    
    

    the adjustViewbounds attribute did the trick:

    Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.

    i stumbled upon it here. thanks for your help!

提交回复
热议问题