java - How to add a list of card views in Android with only one of them removable by swiping? -


i'm trying make card list on main activity of app, , want user have ability delete first card, informative. rest of cards open layouts correspond them.

check roman nurik's android-swipetodismiss: https://github.com/romannurik/android-swipetodismiss

implementation example here: https://github.com/romannurik/android-swipetodismiss/blob/master/src/com/example/android/swipedismiss/mainactivity.java

now in dismiss callback enable dismiss on first element.

new swipedismisslistviewtouchlistener.dismisscallbacks() {      @override     public boolean candismiss(int position) {         return position == 0;     }      ...  }); 

not sure if second element becomes 1 @ position 0. if that's need track if header dismissed. anyways, can start , work out.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -