如何爲圖像創建android的佈局?如何爲圖像創建android的佈局?
我嘗試下面的代碼:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="kkkkddd"
android:layout_marginLeft="100dp"
android:id="@+id/text_email" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/prompt_email"
android:id="@+id/text_label_email"
android:layout_toLeftOf="@id/text_email" />
...
但label_email
被隱藏。
同樣的問題:如何將所有電視與圖像上的一條垂直線對齊? – HotIceCream
將所有這些Linearlayouts放置在外部Linearlayout中,並且方向垂直。 –
並在第一個電視中添加'android:gravity =「right」。好。但是嵌套佈局對性能不利。用RelativeLayout回答更好。 – HotIceCream