I am developing and application that will have to implement the swipe-to-refresh pattern described here. Looking at the android docs here, it is stated that:
You enable this behavior by adding the widget to your layout file as the parent of a
ListView
orGridView
, and implementing the refresh behavior that gets invoked when the user swipes.
Well the issue is that I do not plan on having a ListView
or GridView
to layout my data, I am using cards (android.support.design.CardView
) and I am planning on having a scrolling list of cards that the end user can swipe to refresh.
Can I still use the SwipeToRefreshLayout
as described in the tutorial with my cards, or does it force me to use ListView
s or GridView
s to display my data?