0

In my app i need to create cardview with curved top and bottom lines, like this:

enter image description here

I tried to search answer on stackoverflow and google but i haven't found anything. Also i tried to make it via xml, but i couldn't. Can anyone help me with this? I can't use it like image background because i need to change background color when i click on card and i have a lot of such card in my recyclerview and a lot of different colors for every card. Thx.

iCaesar
  • 421
  • 2
  • 10
  • 23
  • for cardView you need to add (card_view:cardCornerRadius="4dp") to the cards layout -- http://developer.android.com/training/material/lists-cards.html – Tasos Oct 29 '15 at 21:53

1 Answers1

0

You need to use a custom shape a la this as the background of the view. edit see this post

Community
  • 1
  • 1
Tyler Sebastian
  • 9,067
  • 6
  • 39
  • 62