我很努力与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