Flipping Cardview In Recyclerview
I am trying to implement a CardView flip in a RecyclerView. I just cannot figure out a simple solution. I have a working CardView where i can display a list of card using the recyc
Solution 1:
I know this is an old question,but this answer may help someone in future.
You can make use of this library
https://github.com/sachinvarma/EasyFlipView
Put this inside your gradle,
compile 'com.github.sachinvarma:EasyFlipView:2.0.4'
The xml will be like,
<com.wajahatkarim3.easyflipview.EasyFlipViewandroid:layout_width="match_parent"android:layout_height="wrap_content"app:flipOnTouch="true"app:flipEnabled="true"app:flipDuration="400"app:flipType="vertical" //horizontalorvertical
><!-- Back Layout Goes Here --><includelayout="@layout/flash_card_layout_back"/><!-- Front Layout Goes Here --><includelayout="@layout/flash_card_layout_front"/></com.wajahatkarim3.easyflipview.EasyFlipView>
You can see a demo gif here.
Thanks to Wajahat karim.
Solution 2:
You could use a ViewFlipper. It's a standard Android widget.
Post a Comment for "Flipping Cardview In Recyclerview"