I am introducing a new Material Card design from the Github Cardlib library. Link to the library: Cardslib Github But I can not implement multiple cards inside the Recycler view. It would be very helpful if someone had already implemented the new Cardlib v2 library.
The problem is that the cards go, but they do not have a background image and action buttons.
The map platform I'm trying to implement is:

Here is the code for RecyclerView
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp" card:list_card_layout_resourceID="@layout/native_recyclerview_card_layout" android:id="@+id/card_recyclerview"/>
Here is the code for Activity
public class AboutActivity extends ActionBarActivity { final int TOTAL_CARDS = 3;
UPDATE:
material_card.xml:
<it.gmariotti.cardslib.library.view.CardViewNative xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card="http://schemas.android.com/apk/res-auto" android:id="@+id/list_cardId" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/native_recyclerview_card.base" card:card_layout_resourceID="@layout/native_material_largeimage_text_card"/>
In xml layout:
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/myCardList" card:list_card_layout_resourceID="@layout/material_card" />
Inside the loop:
ArrayList<BaseSupplementalAction> actions = new ArrayList<BaseSupplementalAction>(); // Set supplemental actions TextSupplementalAction t1 = new TextSupplementalAction(this, R.id.action1); t1.setOnActionClickListener(new BaseSupplementalAction.OnActionClickListener() { @Override public void onClick(Card card, View view) { Toast.makeText(AboutActivity.this," Click on Text SHARE "+card.getTitle(),Toast.LENGTH_SHORT).show(); } }); actions.add(t1); //Create a Card, set the title over the image and set the thumbnail MaterialLargeImageCard card = MaterialLargeImageCard.with(this) .setTextOverImage("Italian Beaches "+i) .setTitle("This is my favorite local beach "+i) .setSubTitle("A wonderful place") .useDrawableId(R.drawable.card_background_01) .setupSupplementalActions(R.layout.about_card_supplemental_actions, actions) .build(); card.setOnClickListener(new Card.OnCardClickListener() { @Override public void onClick(Card card, View view) { Toast.makeText(AboutActivity.this," Click on ActionArea ",Toast.LENGTH_SHORT).show(); } }); card.build(); cards.add(card);
UPDATE 2
After some experimentation, I think this may be the culprit.
<it.gmariotti.cardslib.library.recyclerview.view.CardRecyclerView android:id="@+id/myCardList" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="10dp" card:list_card_layout_resourceID="@layout/material_card" />
Here, even if I rename material_card to something else, it just compiles. I think that "card: list_card_layout_resourceID =" @ layout / material_card "somehow doesnβt work."
UPDATE 3
Finally decided. The problem was the xml declaration. By mistake, I copied this incorrectly. xmlns: card = "http://schemas.android.com/apk/res-auto" is correct.
Thanks so much for helping @Gabriele. This library just chops :)