gabrielemariotti / cardslib

Android Library to build a UI Card

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

draw graph in MaterialLargeImageCard

xbandx68 opened this issue · comments

I Gabriele, I would like to insert inside the MaterialLargeImageCard a graph design.
Is possible to draw a graph in the Card? how can do this?
I use this library https://github.com/PhilJay/MPAndroidChart and I have write a graph inside a Listview :

lv = (ListView) rootView.findViewById(R.id.listView1);
cda = new ChartDataAdapter(GappContext, listGraph);
lv.setAdapter(cda);

I would like to replace the R.drawable.im_beach with a runtime graph, and when the user click un card, I open a new Fragment with a full graph.
I use your code:

card = MaterialLargeImageCard.with(getActivity())
                .setTextOverImage("Italian Beaches")
                .setTitle("This is my favorite local beach")
                .setSubTitle("A wonderful place")
                .useDrawableId(R.drawable.im_beach)
                .setupSupplementalActions(R.layout.carddemo_native_material_supplemental_actions_large_icon, actions ).build();

thanks
andrea bandiera