我需要在垂直和水平中心設置textView10。我嘗試了很多沒有結果...我嘗試了重力選項,但沒有任何想法? textView10在滾動視圖內。感謝幫助。將TextView設置在垂直和水平中心
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:layout_width="151dp"
android:layout_height="fill_parent"
android:textSize="15pt" />
<ScrollView
android:id="@+id/scrollView10"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#000000" >
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:gravity="center_vertical"
android:textAlignment="center"
android:textColor="#ffffff"
android:textSize="13sp"
android:textStyle="italic" />
</ScrollView>
</LinearLayout>
<Button
android:id="@+id/button10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Chiudi" />
</LinearLayout>
酷男孩!謝謝! –