Issue
I have been trying to create the following arrow, but shorter, without the tail and pointing down. But to no avail.
Can someone help me here? I'm stuck and can't figure it out. Do I need to create the shape in code instead of XML or am I just failing at creating the proper XML.
I felt there was no need to post my code since it's really not any different from the code found when visiting the link.
Android triangle (arrow) defined as an XML shape
Solution
The NinePatch class permits drawing a bitmap in nine or more sections. Essentially, it allows the creation of custom graphics that will scale the way that you define.
Take a look at here http://developer-dot-android.blogspot.com.es/2012/03/android-9-patch-image-tutorial.html and here http://blog.fenrir-inc.com/us/2012/02/android-design-enlarge-images-with-nine-patch.html
to understand how to do a 9patch image.
Then, you can create your arrow with any graphic program (i.e. photoshop) and use this online tool or the official SDK tool to make it stretchable
Answered By - Carlos Robles
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.