[英]Nested Relative and Linear Layout
我對android中的布局是陌生的,並且想要實現如下所示的布局,但是對於如何在XML中分層布局我有些困惑。
我目前正在嘗試:
<LinearLayout>
<RelativeLayout>
<ImageView>
<TextView>
</RelativeLayout>
<LinearLayout>
<ImageView>
<TextView>
<ImageView>
<TextView>
</LinearLayout>
</LinearLayout>
我不想讓布局結構過於復雜。 會有更好的方法來構造它嗎?
最好查看此鏈接。 根據經驗,請勿嘗試過多地嵌套布局,即,使其盡可能淺。
因此,在這種情況下,相對布局通常更好。
http://developer.android.com/resources/articles/layout-tricks-efficiency.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.