Personnalisé flèches sans image: Android

J'ai suivi ce tutoriel: http://looksok.wordpress.com/2013/08/24/android-triangle-arrow-defined-as-an-xml-shape/

Le tuto pour la création de flèches comme pour incrémenter/décrémenter les boutons sans avoir à utiliser des images. La forme des flèches sont très bien cependant la flèche est positionnée avec sa base en bas de la touche de la vue et de la flèche vers le bas est positionné à l'est de la base au-dessus du bouton afficher. Dans otherwords, les flèches ne sont pas alignées correctement.

Personnalisé flèches sans image: Android

Je me demandais, est-il une sorte de décalage de l'axe y pour le bouton de points de vue qui peuvent être utilisés pour positionner les flèches de mieux? Le code que j'ai est:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <Button
        android:id="@+id/arrow_up"
        android:layout_width="75dp"
        android:layout_height="75dp"
        android:background="@drawable/custom_arrow" />

    <Button
        android:id="@+id/arrow_down"
        android:layout_width="75dp"
        android:layout_height="75dp"
        android:rotation="180"
        android:layout_toRightOf="@id/arrow_up"
        android:background="@drawable/custom_arrow" /> 
</RelativeLayout>

L'custon_arrow.xml est:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item>
        <!-- android:pivotX="-40%" -->
        <rotate 
            android:fromDegrees="45"
            android:toDegrees="45"
            android:pivotX="-20%"
            android:pivotY="88%" >
            <shape
                android:shape="rectangle" >
                <stroke android:color="@color/transparent" android:width="5dp"/> 
                <solid
                    android:color="@color/grey_shade" />
            </shape>
        </rotate>
    </item>
</layer-list>

OriginalL'auteur portfoliobuilder | 2013-12-27