I have a 9-patch image file which looks like this:
When I use it it appears like this:
What I actually wanted to achieve is the complete dot in the center repeated instead of stretched. I hope that it's possible.
I have a 9-patch image file which looks like this:
When I use it it appears like this:
What I actually wanted to achieve is the complete dot in the center repeated instead of stretched. I hope that it's possible.
First make sure you save your 9 patch image as your_image_name.9.png and store it in the res/drawable folder. Then in your xml just set the layout background with-- android:background="@drawable/your_image_name" and that should work. If it's still not working can you post your layout xml?
I think it's not possible using 9-Patch to make repeated patterns (only stretching certain area), perhaps you could find more about it here:
http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch