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.

Linear Layout and weight in Android

I always read about this funny weight value in the Android documentations. Now I want to try it for the …

android android-linearlayout android-layout-weight
Set the layout weight of a TextView programmatically

I'm trying to dynamically create TableRow objects and add them to a TableLayout. The TableRow objects has 2 items, a TextView …

android layout textview android-layout-weight
How to set layout_weight attribute dynamically from code?

How can I set the value for the attribute layout_weight for button in android dynamically from java code ?

android android-layout android-layout-weight
What is android:weightSum in android, and how does it work?

I want to know: What is android:weightSum and layout weight, and how do they work?

android android-layout android-layout-weight
android:layout_height 50% of the screen size

I just implemented a ListView inside a LinearLayout, but I need to define the height of the LinearLayout (it has …

android android-layout size android-linearlayout android-layout-weight
Android how to display 2 listviews in one activity one after the other

I have used this code to display 2 list view one on top of the other. <LinearLayout xmlns:android="http://…

android listview android-layout-weight
Android Linear Layout Weight Programmatically

I want to add three linear layouts to an activity programatically each of same width. the problem is i am …

android android-linearlayout android-layout-weight
How to divide layout to 3 parts?

I'm trying to divide my layout to 3 equal rows, trying to use LinearLayout and weights, but it doesn't work, it …

android android-linearlayout android-layout-weight
TableLayout weight sum issues

I'm trying to implement a 40/60 percent split in my TableLayout but I'm having no luck. When testing the code on …

android android-layout android-tablelayout tablerow android-layout-weight
How do I set android:layout_columnWeight="1" programmatically to an element in an android support v7 Gridlayout

I'm trying to build a GirdLayout programmatically with 2 columns and I want these columns to have equal width set at …

android android-gridlayout android-layout-weight