這個問題可能會提前問,但我真的不知道如何搜索它也。對齊文本同樣
我想達到的是這樣的。
city : some city
state : some state
pincode : some pin code
phone no : some phone number
城市:是一個文本視圖和一些城市是第二個文本視圖。兩者都處於線性佈局。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView android:text="City : "
android:textSize="15sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<TextView android:text="Some city"
android:textSize="15sp"
android:id="@+id/lblPermanentCity"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
</LinearLayout>
任何幫助將感激
我是否需要將width屬性更改爲所有父線性佈局的match_parent? –
我不好意思我改變了高度屬性 –
感謝您的正確答案:) –