cardslib
cardslib copied to clipboard
Creating CardViewNative programatically
Is it possible to create this programatically?
<it.gmariotti.cardslib.library.view.CardViewNative
android:id="@+id/my_nice_card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card:card_layout_resourceID="@layout/native_cardwithlist_layout"
style="@style/card_external"/>
Yes.
CardViewNative cardViewNative = new CardViewNative(context);
or
you can create a xml containing just the CardView and inflate it.
both ways worked for me.