Closed GantMan closed 9 years ago
The code is a lot like iOS. Just add refreshable to the class, and use on_refresh and stop_refreshing. This requires the ultra pull to refresh gradle
refreshable
on_refresh
stop_refreshing
# pull to refresh dependency 'in.srain.cube:ultra-ptr:1.0.10'
Wrap your listview in the XML tag to identify what is Pull to Refresh
<in.srain.cube.views.ptr.PtrClassicFrameLayout android:id="@+id/store_house_ptr_frame" xmlns:cube_ptr="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <ListView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/list_view" android:layout_gravity="center_horizontal" /> </in.srain.cube.views.ptr.PtrClassicFrameLayout>
I'd love to remove this, so listviews are automatically wrapped, but that's a bit outside our needs right now.
Special thanks to @markrickert who answered some amazing questions about refreshable on ProMotion, and @fvonhoven for moral support on XML woes :+1:
The code is a lot like iOS. Just add
refreshable
to the class, and useon_refresh
andstop_refreshing
. This requires the ultra pull to refresh gradleCaveat:
Wrap your listview in the XML tag to identify what is Pull to Refresh
I'd love to remove this, so listviews are automatically wrapped, but that's a bit outside our needs right now.
Special thanks to @markrickert who answered some amazing questions about
refreshable
on ProMotion, and @fvonhoven for moral support on XML woes :+1:Example added to home application