easy arrow as drawable

I have spent hours trying to make the below arrow using drawables using all kind of rotations without any success it simply never looked like it:

Is it even possible to make it using shape/layer-list, without using png?

* EDIT *

The closest I could get to the desired arrow was this. I could never put the lines to match and NOT to overlap:

Answers


maybe this what you are looking for

arrow.xml

    <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item>
        <rotate
            android:fromDegrees="-45"
            android:pivotX="100%"
            android:pivotY="50%"
            android:toDegrees="-45">
            <shape
                android:shape="line">
                <stroke
                    android:width="3dp"
                    android:color="@android:color/holo_green_light"
                    />
            </shape>
        </rotate>
    </item>

    <item>
        <rotate
            android:fromDegrees="45"
            android:pivotX="100%"
            android:pivotY="50%"
            android:toDegrees="45">
            <shape
                android:shape="line">
                <stroke
                    android:width="3dp"
                    android:color="@android:color/holo_green_light"
                    />
            </shape>
        </rotate>
    </item>
</layer-list>

in case you have edges not sticking you can add top and bottom to elements so for first one add <item android:bottom="5dp"> for second <item android:top="4dp"> ....


Need Your Help

Python 3 - Race condition on lock indexed by string

multithreading caching concurrency python-3.x

I have a simple server which does on-demand mirroring. Fetching is expensive (network latency, integrity check, (re)compression, etc.). Thus, I'd like to have one lock per url being fetched, so tha...

Custom draw items in ComboBoxCell

c# winforms datagridview

I am trying to draw items in a ComboBoxCell in a DataGridView using the DrawItem Event. Following is my code.