現在、Android プロジェクトを作成していますが、xml ファイルに問題があります。日付ピッカーがなくても、リストビューはうまく機能しています。ただし、(Java ファイルを編集せずに) 日付ピッカーを追加すると、リストビューが消えます。以下は私のAndroid xmlファイルです:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/background"
android:orientation="vertical" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Enter Date"
android:textColor="@android:color/white"
android:textSize="25sp" />
<DatePicker
android:id="@+id/datePicker1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Confirm" />
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/background_dark" >
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false" />
</LinearLayout>
</LinearLayout>
私のxmlファイルに何か問題がありますか?
更新: リストビューは、日付ピッカーを使用しても samsung galaxy Y duos に表示されますが、samsung galaxy note には表示されないことがわかりました。