gabrielemariotti / cardslib

Android Library to build a UI Card
4.66k stars 1.19k forks source link

Material Card Dynamic Image Height #355

Open matantsu opened 9 years ago

matantsu commented 9 years ago

i was wondering if i could make the material card "wrap_content" so that it adjusts to changing image heights. if not , is there anyway i can bypass it?

gabrielemariotti commented 9 years ago

You should try it. Pay attention to the image ratio.

matantsu commented 9 years ago

Setting "wrap_content" on the card doesn't affect the image. It's height is defined in: <dimen name="card_material_largeimage_height">200dp</dimen>

And i can't put "wrap_content" in there.

matantsu commented 9 years ago

Also using material card with text always leaves a fixed height for the title and subtitle instead of having it "wrap_content" So if you don't want either of them it leaves an unfitting blank space.

ghost commented 9 years ago

@matantsu How did you fix the image bug? "The image height is now set to "wrap_content" instead of "match_parent" Where was this change made?

uzumakinaruto123 commented 8 years ago

@ghost @matantsu @gabrielemariotti i am having the same problem. i want only title but the content layout is always fixed height. any workaround ? or i will have to change to different card ?