I have written a couple layout files where I used the layout_weight
attribute to create a ratio between different views.
At some point, I start getting
Update: As we know the percent support library is deprecated from API level 26. ConstraintLayout
is the new way to achieve the same flat xml structure.
Updated Github Project
Updated Samples:
Update: Great news android percent support library solves our problem of performance and nested messy weighted LinearLayout
compile 'com.android.support:percent:23.0.0'
Demo HERE
Consider this simple layout to demonstrate the same.
Avoided performance degrader nested LinearLayout
with weights.Really awesome!!!.