Android SwipeRefreshLayout获得了动作移动事件,但没有';没有活动指针id
我正在将SwipeRefreshLayout与AppCompat ListFragment一起使用。当我拉刷新时,它似乎工作正常,但有时在日志中我可以看到以下错误。如果在刷新列表或刚刚完成刷新时再次拉列表,则会发生这种情况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.
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;
}