How to wrap content views rather than background drawable?

前端 未结 5 1382
攒了一身酷
攒了一身酷 2020-12-06 04:48

How can I get a LinearLayout (or any other ViewGroup) to assume the size of it\'s child views rather than assuming the size of the background image?



        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-06 05:16

    This happens because the Android view calculates its minimum size based on its background drawable size.

    Check my answer here in this another post which covers the same problem which will help you to achieve your layout configuration.

提交回复
热议问题