MainActivity に 2 つの ListFragment を配置します。
これは ListFragment xml ファイルです: fragment1.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="@id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false" />
</LinearLayout>
私の質問は、なぜここで android:id="@id/android:list" を使用する必要があるのですか? たとえば、@+id/frag_list を使用すると、プログラムがクラッシュし、エラー「クラス フラグメントの膨張」が発生します。