我正在将此代码用于 android 中的滑动、onTouch 事件
<ViewFlipper
android:id="@+id/flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/tabBTBar" >
<LinearLayout
android:id="@+id/first"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/cat_listLV"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="@color/grey"
android:dividerHeight="1dp" >
</ListView>
</LinearLayout>
<LinearLayout
android:id="@+id/Second"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#C0C0C0"
android:gravity="center"
android:orientation="vertical" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_launcher" />
</LinearLayout>
</ViewFlipper>
当我运行此代码时,它仅显示第一个 LinerLayout 中的列表视图。
当我在第一个线性布局中使用而不是它时它会正常工作。
请建议我如何做到这一点。我想在第一个和第二个 LinearLayout 中显示 Listview。