cardslib icon indicating copy to clipboard operation
cardslib copied to clipboard

Creating CardViewNative programatically

Open ddmmcjmm opened this issue 9 years ago • 1 comments

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"/>

ddmmcjmm avatar Sep 25 '15 11:09 ddmmcjmm

Yes.

CardViewNative cardViewNative = new CardViewNative(context);

or

you can create a xml containing just the CardView and inflate it.

both ways worked for me.

geshner avatar Jan 29 '16 18:01 geshner