我在尝试在线性布局中调整 2 个列表视图时遇到了一点问题
1 个列表视图(左)有修复文本,所以当右列表视图有更多文本时,问题是 2 个列表视图
下面是活动代码:
lv1 = (ListView) findViewById (R.id.aulalist);
lv2 = (ListView) findViewById (R.id.horariolist);
String [] horarios = res.getStringArray(R.array.horarios);
lv1.setAdapter(new ArrayAdapter<String> (this, android.R.layout.simple_list_item_1, horarios));
lv2.setAdapter(new ArrayAdapter<String> (this, android.R.layout.simple_list_item_1, aula));
和布局代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:layout_width="169dp"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/aulalist"
android:layout_width="169dp"
android:layout_height="fill_parent"
/>
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<ListView
android:id="@+id/horariolist"
android:layout_width="wrap_content"
android:layout_height="fill_parent" />
</LinearLayout>
</LinearLayout>