Color tolerance in a 9-patch border

by Nmix » Wed, 26 Aug 2009 03:49:54 GMT

Sponsored Links
 While fooling around with some custom buttons I made, to save time I
manipulated the color of the entire 9-patch image, not just inside the
1-pixel border. Every time this corrupts the 9-patch functionality of
the button.

What is the tolerance of the color and alpha pixels of that 9-patch
border? Does Android look for an exact match to, say, #FF000000?

I noticed in these cases that when opening the corrupt file, the 9-
patch tool briefly flashes the (bad) border pixels, then they change
to transparent. It also doesn't add a 1-pixel border to the image as
it does for .PNG files that have not yet been converted to 9-patch.
This seems to be odd behavior.

Color tolerance in a 9-patch border

by Dianne Hackborn » Wed, 26 Aug 2009 03:55:52 GMT

 The border has to be either black and white or black and transparent.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


Sponsored Links

Other Threads

1. Paging bos julius alexander

Siang semua,

Mau paging neh,
Bos julius, kalau baca tolong bales email japrian yah.

Terima kasih.

"Indonesian Android Community [id-android]" 

2. Booked was OOT WTS lenovo s10 2nd.

Hai semua

Sudah dibooked sama temen baik di lindetevez.

Jika batal diapdet lg ntar,

Makasih mas agus :) 


"Indonesian Android Community [id-android]" 

3. AudioRecord Problem, please help!

4. writing file

5. Cara Tau Milestone Udah Di Root Atau Belom Gimana Caranya ya?

6. (WTA) Yg jual micro sd di Gajah mada plasa?

7. Process Crash whilst using JUnit