Make ImageView fit width of CardView

前端 未结 10 688
太阳男子
太阳男子 2020-12-04 11:00

I have a CardView with rounded corners, I want to have an ImageView at the top like shown in the example taken from the material design guidelines

10条回答
  •  一个人的身影
    2020-12-04 11:52

    I got this to work by putting a RoundedImageView inside of a CardView. Also you need to set the appropriate CardView attributes.

    https://medium.com/@etiennelawlor/layout-tips-for-pre-and-post-lollipop-bcb2e4cdd6b2#.kmb24wtkk

提交回复
热议问题