Top "Android-layout-weight" questions

In Android by setting a layout_weight for the Views inside the LinearLayout, the parent layout divides the available space between its children according to their weights.

How to set view weights?

I'm trying to get the views inside a LinearLayout to fill the width. I have tried setting it by using …

android android-linearlayout android-layout-weight
Nested weights are bad for performance in my XML code

I want to display an organized grid. So I use LinearLayout and Layout Weight option, every thing works perfectly, but …

android xml android-layout-weight
How to have equal size of width and height [square shape] using layout_weight?

I have following code: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" > &…

android android-layout-weight
how to set textview width wrap_content but limit to 1/3 of parent's width

Having a TextView, its width should not go over 1/3 of its parent's width. If its width is smaller than 1/3 of …

android textview android-layout-weight
Android set max width in percentage of a TextView in LinearLayout of vertical orientation

I'd like to set the layout_weight of the TextView with the tv_long_text to 80% in the following LinearLayout …

android android-linearlayout android-layout-weight
Android: Setting the Weight parameter programmatically does the opposite of what i want

I'm having a problem with android. I'm setting the Weight parameter in Java, but it's doing exactly the oposite of …

java android android-layout android-layout-weight
Android layout using layout_weight, layout_width and maxWidth

I'm trying to get a row of text which will be something like foofoofoo - barbarbar but I want it …

android android-layout textview android-layout-weight
How to get height in pixels of LinearLayout with layout_weight

this is my first post. I am learning to code in java for android apps. I am using a LinearLayout "…

java android android-layout layoutparams android-layout-weight
Android: trying to understand android:layout_weight

I'm trying to divide a page in three parts. I'd like to do it in percentage values, however that is …

android layout android-layout-weight
Android soft keyboard hides edit text field with windowSoftInputMode set

Some of my activities are made up of 3 fragments in a vertical layout (Top, middle and bottom) The middle fragment …

android android-fragments android-softkeyboard android-layout-weight