我很努力與android佈局設置。無論內容是什麼,我都想保持相同的固定大小,並且想要在中心顯示所有內容!Android固定佈局3/4 + 1/4
---------------------------------
- - -
- - -
- 3/4 (center) - 1/4 -
- - (ct) -
- - -
- - -
---------------------------------
這裏是我的layout.xml代碼,但它不工作:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:orientation="horizontal"
android:weightSum="1" >
<VideoView
android:id="@+id/videoView1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center"
android:layout_weight=".25" />
<TextView
android:id="@+id/textView1"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center"
android:layout_weight=".75"
android:freezesText="false"
android:includeFontPadding="false"
android:scrollHorizontally="false"
android:selectAllOnFocus="false"
android:text="@string/Runstring" />
</LinearLayout>
編輯:
我試圖從下面和經歷了一些代碼:如果我做@string/Runstring
=只是一個「一個」,或者如果我做到「..........長時間......」它正在改變整個佈局!這不是保持3/4 + 1/4的比例!這是爲什麼?
謝謝!似乎工作! – Raymond