2

I'm trying to create a drawable that looks like the KitKat toast bacground:

enter image description here

but I have no idea how to recreate the fully round sides, I always end up with a rectangle with rounded edges like this:

enter image description here

or the sides aren't really round:

enter image description here

Any idea on how to accomplish this?

Btw, just setting the color of the Toast doesn't work.

Community
  • 1
  • 1
fweigl
  • 21,278
  • 20
  • 114
  • 205

2 Answers2

7

Android 9-patch shadow generator will help you achieve the desired 9patch, allowing you to customize the roundness of the sides to your liking. enter image description here

"Fill & Outline" will also give you the ability to apply some color.

Rany Albeg Wein
  • 3,304
  • 3
  • 16
  • 26
6

Do it like this:

holo toast background from API 19

This is the toast_frame_holo.9.png from Android-19 (HDPI)

Community
  • 1
  • 1
FunkTheMonk
  • 10,908
  • 1
  • 31
  • 37