-
Notifications
You must be signed in to change notification settings - Fork 377
BigImageCard
Pranjal Paliwal edited this page Mar 25, 2016
·
7 revisions
BigImageCard is a Card which shows a big image, a title inside the image, and a description below the image.
Card card = new Card.Builder(this)
.setTag("BIG_IMAGE_CARD")
.withProvider(new CardProvider())
.setLayout(R.layout.material_big_image_card_layout)
.setTitle("Card number 5")
.setDescription("Lorem ipsum dolor sit amet")
.setDrawable(R.drawable.photo)
.endConfig()
.build();
For title and description, you only need to call the setTitle(String title)
and setDescription(String description)
methods
BigImageCard card = new BigImageCard(context);
card.setTitle("Your title");
card.setDescription("Your description");
In order to set the image, you need to call the setBitmap()
method, and pass it one of the following:
- A
Bitmap
- A
Context
plus a resource id (such as R.drawable.my_image) - A
Drawable