Skip to content Skip to sidebar Skip to footer

Putting A Background On The Linear Layout And Takes Almost 3/4 Of The Screen

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 put backgro

Solution 1:

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")

Post a Comment for "Putting A Background On The Linear Layout And Takes Almost 3/4 Of The Screen"