I need to create 2 buttons arranged like this in my android application:
it is possible to do this using shape: name this arrow UP:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<rotate
android:fromDegrees="45"
android:toDegrees="45"
android:pivotX="-40%"
android:pivotY="87%" >
<shape
android:shape="rectangle" >
<stroke android:color="@color/transparent" android:width="10dp"/>
<solid
android:color="@color/your_color_here" />
</shape>
</rotate>
</item>
</layer-list>
usage:
<Button
android:layout_width="70dp"
android:layout_height="70dp"
android:background="@drawable/arrow_up" />
for the other triangle:
<Button
android:layout_width="70dp"
android:layout_height="70dp"
android:rotation="180"
android:background="@drawable/arrow_up" />
Triangle towards right:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="48"
android:pivotX="115%"
android:pivotY="95%"
android:toDegrees="48">
<shape android:shape="rectangle">
<stroke
android:width="10dp"
android:color="#c6802a" />
<solid android:color="#c6802a" />
</shape>
</rotate>