私は、ViewPagerと2つのフラグメントを持つアクティビティを持っています。各フラグメントでは、SwipeToRefreshLayoutとListViewを配置します。 Xmlは次のようになります。ViewPagerフラグメントのSwipeToRefreshレイアウトに関する問題
<?xml version="1.0" encoding="utf-8"?>
*<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/going_out_activity_swipe_to_refresh"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">*
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/going_out_activity_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_going_out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_tab_new"/>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
ここで問題があります。リストが自分の画面を超えていて、アイテムを見るためにスクロールしなければならないとき、スクロールして、スクロールしないと、スワイプされます(SwipeToRefreshLayoutが呼び出されます)。これをどうすれば解決できますか?
この1つは、リストビューのための魔法のように動作します。ありがとうございました。 –