1
请看看我的代码的拳头,我要让像下面的图片布局,但两个列表视图不起作用:布局不显示
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="7"
android:baselineAligned="false">
<LinerLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"><!-- here is the problem-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusableInTouchMode="false"
android:text="@string/Subdistrict"/>
<ListView
android:id="@+id/Subdistrict"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</LinerLayout>
<LinerLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusableInTouchMode="false"
android:text="@string/Building"
android:textColor="#ffffff"/>
<ListView
android:id="@+id/Building"
android:layout_width="match_parent"
android:layout_height="match_parent">
</ListView>
</LinerLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<Button
android:id="@+id/BuildingSelectOk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/OK"/>
<Button
android:id="@+id/BuildingSelectCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Cancel"/>
</LinearLayout>
</LinearLayout>
我想实现像下面的图片布局:
但两人的ListView不显示在所有的,我错过了什么?有人帮助我,谢谢。
的一个问题是,你拼写错误'LinearLayout'为'LinerLayout' – 2013-03-01 03:26:30
尝试使用'RelativeLayout',而不是'LinearLayout',作为基地的布局。 – SudoRahul 2013-03-01 03:29:06
@ A - C哦谢谢, – 2013-03-01 03:42:32