android 下拉刷新控件PtrClassicFrameLayout(cube)

时间:2025-02-19 22:54:49
< android:id="@+id/swipe_container" xmlns:cube_ptr="/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/cube_mints_f1f1f1" cube_ptr:ptr_duration_to_close="200" cube_ptr:ptr_duration_to_close_header="1000" cube_ptr:ptr_keep_header_when_refresh="true" cube_ptr:ptr_pull_to_fresh="false" cube_ptr:ptr_ratio_of_header_height_to_refresh="1.2" cube_ptr:ptr_resistance="1.7"> 3.使用 (1)
implements PtrHandler
(2)使用

layoutManager = new LinearLayoutManager(getActivity());

swipe_container.setPtrHandler(this);
// header
final StoreHouseHeader header = new StoreHouseHeader(getActivity());
(0, LocalDisplay.dp2px(15), 0, 0);
(getResources().getColor(.maincolor));
("bamasoso");

swipe_container.setDurationToCloseHeader(3000);
swipe_container.setHeaderView(header);
swipe_container.addPtrUIHandler(header);