Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android SwipeRefreshLayout获得了动作移动事件,但没有';没有活动指针id_Android - Fatal编程技术网

Android SwipeRefreshLayout获得了动作移动事件,但没有';没有活动指针id

Android SwipeRefreshLayout获得了动作移动事件,但没有';没有活动指针id,android,Android,我正在将SwipeRefreshLayout与AppCompat ListFragment一起使用。当我拉刷新时,它似乎工作正常,但有时在日志中我可以看到以下错误。如果在刷新列表或刚刚完成刷新时再次拉列表,则会发生这种情况 E/SwipeRefreshLayout: Got ACTION_MOVE event but don't have an active pointer id. 我的布局的代码是: <FrameLayout xmlns:android="http://schemas.

我正在将SwipeRefreshLayout与AppCompat ListFragment一起使用。当我拉刷新时,它似乎工作正常,但有时在日志中我可以看到以下错误。如果在刷新列表或刚刚完成刷新时再次拉列表,则会发生这种情况

E/SwipeRefreshLayout: Got ACTION_MOVE event but don't have an active pointer id.
我的布局的代码是:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

    <android.support.v4.widget.SwipeRefreshLayout
            android:id="@+id/activity_main_swipe_refresh_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ListView
                android:id="@id/android:list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:overScrollMode="never"
                />
    </android.support.v4.widget.SwipeRefreshLayout>
</FrameLayout>

我面临着同样的问题,你试试这个链接,我知道它的代码在你这边工作
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View view = inflater.inflate(R.layout.list_layout, container, false);


    swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.activity_main_swipe_refresh_layout);
    swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            log.d("swipeRefreshLayout onRefresh");
            onRefreshList();
        }
    });

    adapter = new ItemAdapter(getActivity());
    setListAdapter(adapter);
    return view;
}