开发者

If I have specific "android:layout_height" with certain height on a style, will child layout need to specific

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 ,wr开发者_JS百科ap_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.


Hmm I guess as you have given max height to parent .. and wrap content in the child ... so if there's any content larger than 40 dp than its gonna wrap and will come to next line automaitically will be pushing other content a bit downward.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜