I need to create a button that looks like this:
button I was hoping to create it without using images. To create the pink part, I wanted to use a drawable.
How can I include a shape drawable within a button?
I need to create a button that looks like this:
button I was hoping to create it without using images. To create the pink part, I wanted to use a drawable.
How can I include a shape drawable within a button?
You can create a Layout, set background color for that layout as you wish. In that layout add two textviews. Set background for one layout pink. add another under the first textview. Then you can set onClickListener
on layout. It'll work same as that of button and it'll be easy to change colors and text programatically.
Try using an ImageButton
and setting android:src
to point to your ShapeDrawable
resource.