Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linear Layout baselinealigned warning on android

i am getting "Set android:baselineAligned="false" on this element for better performance" while using LinearLayout, I know its regarding performance,but i dont know exactly why it is,please clarify me

like image 259
Hari krishna Avatar asked Oct 13 '15 15:10

Hari krishna


1 Answers

If you are looking for a visual explanation like me, then you might find this useful.

When baselineAlign is enabled(i.e if it is set to true), then all the text in that line will be aligned to have the same baseline.

Note: By default, baselineAligned is set to true. (i.e. baselineAligned=true)

When you make baselineAligned=false, all it needs to do is to add new elements to the linear layout and be done with it. The app need not worry about where the baseline of other elements in the layout is.

See the image below for more clarity

enter image description here

like image 98
lovubuntu Avatar answered Nov 03 '22 00:11

lovubuntu