StuartDTO
StuartDTO

Reputation: 1031

CardView custom with header

I'm trying to create a custom CardView like this :

enter image description here

But I'm not able to do the stuff on the top... how could I do this?

And to do the stuff inside the cardView is ok if I create a LinearLayout or RelativeLayout and then put a LinearLayout horizontal and in weigh 0 put another LinearLayout vertical with 3 TextViews and in weigh 1 LinearLayout with an ImageView? Could you guide me please?

Upvotes: 0

Views: 527

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76699

see CardView; you can use:

  • setBackground(Drawable arg0)
  • setBackgroundDrawable(Drawable arg0)
  • setBackgroundResource(int arg0)

together with a drawable resource, which has that shape.

Upvotes: 1

Related Questions