0
I want to split two widget within the Layoutlinear, being both Textview .
If I use "orientation="horizontal" and in the Textview use the attribute android:layout_weight="1"
, widgets were split on the screen at a 50% ratio for each one!
So my question is :
Is there any way to split these two widgets on the screen in different proportions? like for example 20% of the screen for one and 80% for the other?
This without using ready measures as for example, the screen has 300px, hence I determine that one will have 100px and the other 200px
Ivan, you can use fractional numbers or numbers larger than one as weight, a cool case would be to put the
LinearLayout
withweightSum="5"
and distribute weights between 2 and 3 between your two Views.– Wakim
@Wakim that way worked perfectly! I could do what I wanted! I didn’t know this "weightSum". If you put as answer I give as resolved!
– ivan veloso