I have following questions relate to style and its children who will inherit its style.
Parent:
40dip 0dp 0.5
Children:
***<item name="android:layout_height">wrap_content</item>***
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginBottom">3dip</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textSize">21dip</item>
In the children style, if I include ,wrap_content
it will override the parent 40 to name="android:layout_height">wrap_content
So, in this case , in the children style do i need to include fill_parents or something else.
So far, i have removed it without specify any layout_height...it works fine.
Please let me know if you have any suggestion on my implementation.
Thanks.
嗯,我想是因为您已经给父级提供了最大高度并在子级中包装了内容...因此,如果有大于40 dp的内容大于要包装的内容,则会自动到达下一行,将其他内容稍微向下推。
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.