combining wrap_content on parent and fill_parent on child

前端 未结 2 1283
刺人心
刺人心 2020-12-02 13:01

Setting two or more elements of a linear layout the same height seems to be a great problem.

I want to set four buttons in a row to the same height.

android:

相关标签:
2条回答
  • 2020-12-02 13:35

    That doesn't make sense :(

    Why don't you use android:singleLine="true" and some ellipsode?

    0 讨论(0)
  • 2020-12-02 13:53

    In theory what you are describing should not work ("Because it the parent gets it's height from the childs and vice-versa".) However, we made it work in LinearLayout because it was a very common use case. I recently added similar support to FrameLayout (this feature should be part of Honeycomb.) What you are doing is therefore perfectly valid and will work just fine.

    0 讨论(0)
提交回复
热议问题