fweigl
fweigl

Reputation: 22008

Create 9patch with fully round sides

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.

Upvotes: 2

Views: 3311

Answers (2)

Rany Albeg Wein
Rany Albeg Wein

Reputation: 3474

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.

Upvotes: 7

FunkTheMonk
FunkTheMonk

Reputation: 10938

Do it like this:

holo toast background from API 19

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

Upvotes: 6

Related Questions