【发布时间】:2014-05-26 03:19:08
【问题描述】:
我有一个列表,但它会占据平板电脑的所有屏幕。有没有办法让它只占平板电脑屏幕的一半或1/4?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
</LinearLayout>
【问题讨论】:
标签: android android-layout layout screen-size