why is my layout_weight not working?

前端 未结 3 1238
无人共我
无人共我 2021-01-28 12:48

I have this xml file.I can\'t understand why my second linearlayout which contains editText and callButton isn\'t looking right. It looks like this (the line with the part pictu

3条回答
  •  无人及你
    2021-01-28 13:17

    For layout_weight to work, you should set either the layout_height or layout_weight to be 0dp on the widgets with weight.

    From the looks of things I think you should spend some more time looking into how layout_weight works exactly

    https://developer.android.com/guide/topics/ui/layout/linear.html#Weight

提交回复
热议问题