cardslib icon indicating copy to clipboard operation
cardslib copied to clipboard

Material Card Dynamic Image Height

Open matantsu opened this issue 10 years ago • 5 comments

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?

matantsu avatar Nov 24 '14 15:11 matantsu

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

gabrielemariotti avatar Nov 25 '14 07:11 gabrielemariotti

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 avatar Nov 25 '14 11:11 matantsu

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.

matantsu avatar Nov 25 '14 11:11 matantsu

@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?

ghost avatar Nov 28 '14 14:11 ghost

@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 ?

uzumakinaruto123 avatar May 22 '16 10:05 uzumakinaruto123