Why do I need to wrap an ImageView into a FrameLayout?

前端 未结 6 2131
醉话见心
醉话见心 2020-12-14 01:00

Here is a simple layout:

      

         


        
6条回答
  •  执念已碎
    2020-12-14 01:34

    try to replace android:scaleType="fitStart" with this android:scaleType="fitXY"


    Edit

    in your image view you should set the width of imagView to wrap-content this will take the size of image. If you hard-code the imageView's width (as you have done it by giving the width to 40dp) then this will not look so good in other android mobile devices.

    Still if you want to do so then Try to load image of lesser in resolution. if this image is 200X100 in resolution, then try to load the image of 100X50 in your ImageView

提交回复
热议问题