私はより大きな画面のエミュレーターを持っていました、そしてそれはすべてうまくいきます。ListView
すべてが完全に正常であるため、Javaコードには含まれていません。3.2画面でテストしてみましたが、何も表示されListView
ません。小さい画面(3.2)のエミュレーターで試してみましたが、何も表示されなかったので、これはレイアウトと関係があると思います。
私のlistview.xmlレイアウト:
<?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" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="150dp" >
</ListView>
</LinearLayout>
行xmlファイル:
<?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" >
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text1"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="30dp" />
</LinearLayout>