How to get the width and height of an android.widget.ImageView?

后端 未结 10 1919
长情又很酷
长情又很酷 2020-11-22 16:53
╔══════════════════════════════════════════════╗   ^
║ ImageView    ╔══════════════╗                ║   |
║              ║              ║                ║   |
║              


        
10条回答
  •  囚心锁ツ
    2020-11-22 17:49

    I think you can let the Android OS take care of this for you. Set the scale type on the ImageView to fitXY and the image it displays will be sized to fit the current size of the view.

    
    

提交回复
热议问题