Putting a background on the linear layout and takes almost 3/4 of the screen

后端 未结 1 1526
感情败类
感情败类 2021-01-24 14:19

I have tried all kinds of help from other posts (setting widths to 0dp etc.) but nothing seems to work.

I have 2 layouts and the first one still seems to dominate. If I

相关标签:
1条回答
  • 2021-01-24 14:41

    Do the following things. U can solve your problem.

    • set the android:layout_width of the children to "0dp"
    • set the android:weightSum of the parent
    • set the android:layout_weight of each child proportionally (e.g. weightSum = "5", three children: layout_weight="1", layout_weight="3", layout_weight="1")
    0 讨论(0)
提交回复
热议问题