Open beartistic opened 3 years ago
VIE-AL10
Android 8.0.0
4.1.0
2.0.0-alpha10
无法实现上拉刷新下拉加载更多
mPullLayout.setActionListener(new QMUIPullLayout.ActionListener() { @Override public void onActionTriggered(@NonNull QMUIPullLayout.PullAction pullAction) { mPullLayout.postDelayed(new Runnable() { @Override public void run() { if (pullAction.getPullEdge() == QMUIPullLayout.PULL_EDGE_TOP) { onRefreshData(); } else if (pullAction.getPullEdge() == QMUIPullLayout.PULL_EDGE_BOTTOM) { onLoadMore(); } mPullLayout.finishActionRun(pullAction); } }, 3000); } });
<com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout android:id="@+id/pull_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/qmui_skin_support_color_background"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView" android:background="@android:color/transparent" android:layout_width="match_parent" android:layout_height="match_parent" app:qmui_is_target="true"/> <com.qmuiteam.qmui.widget.pullLayout.QMUIPullRefreshView android:layout_width="wrap_content" android:layout_height="wrap_content" app:qmui_action_view_init_offset="-20dp" app:qmui_pull_edge="top" app:qmui_target_view_trigger_offset="wrap" app:qmui_pull_rate="0.45" app:qmui_can_over_pull="true" app:qmui_need_receive_fling_from_target_view="true"/>
<com.qmuiteam.qmui.widget.pullLayout.QMUIPullLoadMoreView android:layout_width="match_parent" android:layout_height="wrap_content" app:qmui_action_view_init_offset="0dp" app:qmui_pull_edge="bottom" app:qmui_target_view_trigger_offset="wrap" app:qmui_pull_rate="0.45" app:qmui_can_over_pull="true" app:qmui_need_receive_fling_from_target_view="true"/>
</com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout>
mPullLayout.setActionListener,上拉下拉无效
无
运行环境
VIE-AL10
Android 8.0.0
4.1.0
2.0.0-alpha10
具体问题描述
无法实现上拉刷新下拉加载更多
<com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout android:id="@+id/pull_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/qmui_skin_support_color_background"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView" android:background="@android:color/transparent" android:layout_width="match_parent" android:layout_height="match_parent" app:qmui_is_target="true"/> <com.qmuiteam.qmui.widget.pullLayout.QMUIPullRefreshView android:layout_width="wrap_content" android:layout_height="wrap_content" app:qmui_action_view_init_offset="-20dp" app:qmui_pull_edge="top" app:qmui_target_view_trigger_offset="wrap" app:qmui_pull_rate="0.45" app:qmui_can_over_pull="true" app:qmui_need_receive_fling_from_target_view="true"/>
</com.qmuiteam.qmui.widget.pullLayout.QMUIPullLayout>
问题
mPullLayout.setActionListener,上拉下拉无效
异常日志(堆栈)
无