简体   繁体   中英

What is baseline android in linearlayout

BaseLine

When set to false, prevents the layout from aligning its children's baselines.

I don't get that give me a visual example please and also about android:baselineAlignedChildIndex

Here is an image of a baseline example in buttons in a linear horizontal oriented layout.

在此处输入图片说明

check out this image: android:baselineAlignedChildIndex example image .I got the image from this link.

Here in the image the "android:baselineAlignedChildIndex" attribute value is set as android:baselineAlignedChildIndex="1" so the textview is aligned in accordingly with button2 rather than with button1 .If we change the value as android:baselineAlignedChildIndex="0" the text is aligned in accordingly with button1 .(Usually index starts at "0")

Please refer this link for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM