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
background.

Firstly,I used this 9 patch stretchable image:
     http://www.pixnet.net/photo/BILLTSAO/89655635 

apply in the same size "EditText" view , it present like this:
     http://www.pixnet.net/photo/BILLTSAO/89655636 

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

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:
      http://www.pixnet.net/photo/BILLTSAO/89654053 

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:
      http://www.pixnet.net/photo/BILLTSAO/89654195 

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:
      http://www.pixnet.net/photo/BILLTSAO/89654194 

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

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?

     http://www.pixnet.net/photo/BILLTSAO/89659633 

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


 Hi,

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






-- 
Romain Guy
www.curious-creature.org

--~--~---------~--~----~------------~-------~--~----~


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. How to use HttpURLConnection for bluetooth application

Hi everyone

I'm trying to figure out how HttpURLConnection class is used for developing 
bluetooth applications over android environment.
from some application logs (logcat) i can see messages like:
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connec
 t(HttpURLConnection.java:807)
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.sendRe
 quest(HttpURLConnection.java:1224)
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequ
 estInternal(HttpURLConnection.java:1558)
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequ
 est(HttpURLConnection.java:1551)
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOut
 putStream(HttpURLConnection.java:1145

looking for some getting started for this?

I'll appreciate your help

Moish


-- 

2. Live wallpaper galaxy spica

Hu,
Saya punya spica, begitu beli udah pake eclair, tapi skarang masih blom bisa
nongol live wallpapernya. Mohon bantuan dari suhu2 nih.
Tq.

Sent from Google Android Eclair powered by Sinyal Kuat INDOSAT

-- 
"Indonesian Android Community [id-android]" 

3. Keyboard blocks the bottom part of my scrollView

4. OMX_Init questions for vendor specific components

5. IM2 ku cuman bisa konek 2g doang..

6. Replacing the default volume toast

7. Drawable resource XML "alias"