About nine patch stretchable image

by Bill.Tsao » Tue, 13 May 2008 02:48:50 GMT

Sponsored Links
 Dear all:

I would like to use 9 patch stretchable image to do my style

Firstly,I used this 9 patch stretchable image:

apply in the same size "EditText" view , it present like this:

It is obvious to find the "EditText" view has difference color in its

It is like a small rectangle in its rectangle.

I thought this thing is relative about left and top border line.

Secondly,I change the left and top border line, the 9 patch
stretchable image:

The left line cover all the height and top line cover  rear 4/5 width

apply in the same size "EditText" view , it present like this:

This time it only has a small rectangle in the left of its retangle.

If we zoom out the images , we can find this images as though some
algorithm parsed

Finally,I add a red point in my 9 patch image:

I presume the 9 patch image parser will do some graph algorithm

I have two questions:

1. If it is a nine patch stretchable image , the four corners of the
rectangle(following graph) should not be stretched. but they be done
by above examples facely. Why? and what can I resolve this problem?


2.If I don't want to use the stretchable algorithm. Can I disable it?
Or , dose Android support the tile method to user to use they graph to
tile they view backgound?

May you anwser my question? Thank a lot.

About nine patch stretchable image

by Romain Guy » Tue, 13 May 2008 06:01:08 GMT


Your image is not a valid 9 patch. The white borders should be transparent.

Romain Guy


Sponsored Links

About nine patch stretchable image

by Bill.Tsao » Wed, 14 May 2008 01:52:40 GMT

 I got it !! And I modified my 9 patch stretchable image.

It can work correctly.

But I think this thing can mark in the document.

It will help another developers when they use the 9 patch stretchable
image.  :0

Guy , Thank a lot !!! : )


Other Threads

1. Quality & Affordable Jewelry, Cosmetics, Skin Care, Clothing

Online Shopping!
Jewelry, Cosmetics, Skin Care Products, Hair Care Products, Health &
Wellness Products, Clothing, Shoes, Housewares, and Childrens Products

we take PAYPAL as the method of payment!
please kindly visite our website: http://www.cnnshoe.com
msn: cnnshoe2...@hotmail.com
email: cnns...@gmail.com

unsubscribe: android-porting+unsubscr...@googlegroups.com

2. How can i import com.android.internal.phone?

Hi there,
I'm trying to invoke the functions belong to class phone and
PhoneFactory. But when I'm trying to import these packages, it reminds

import com.android.internal.telephony.Phone
import com.android.internal.telephony.PhoneFactory
Phone phone = PhoneFactory.getDefaultPhone()

The com.android.internal.telephony.Phone can not be resolved.
The com.android.internal.telephony.PhoneFactory can not be resolved.

But some other packages can be imported. I don't know why. I think all
this packages should be included in the SDK.
Can any one tell me where I am getting wrong?

3. usb connection detection

4. 1.5 SDK: "android list target" failed

5. How can i import com.android.internal.phone?

6. "send" intent only when activity is on top running

7. Accessing native service from an application