Question: I am trying to make a button with right arrow in it.
I have defined a card view with a button inside it. but I am not sure how I can put the arrow along with it and if its possible to achieve in xml.
Button should look like this :

[![enter image description here](https://i.stack.imgur.com/iLP4p.png)](https://i.stack.imgur.com/iLP4p.png)

My xml looks like this :

```
 <android.support.v7.widget.CardView
    android:id="@+id/signupCard"
    style="@style/CardView.Light"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginBottom="18dp"
    android:layout_marginEnd="29dp"
    android:layout_marginLeft="29dp"
    android:layout_marginRight="29dp"
    android:layout_marginStart="29dp"
    android:layout_marginTop="198dp"
    app:layout_constraintBottom_toTopOf="@+id/loginCard"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <Button
        android:id="@+id/signup"
        style="@style/Widget.AppCompat.Button.Borderless"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/background_light"
        android:minWidth="0dp"
        android:paddingEnd="8dp"
        android:paddingStart="8dp"
        android:scaleType="center"
        android:text="@string/signUp"
        android:textColor="#DE000000" />
</android.support.v7.widget.CardView>

```

Answer: 
Try to use this layout.
It will work for your case.

```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.cardview.widget.CardView
    android:id="@+id/signupCard"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="18dp"
    android:layout_marginEnd="29dp"
    android:layout_marginLeft="29dp"
    android:layout_marginRight="29dp"
    android:layout_marginStart="29dp"
    android:layout_marginTop="198dp"
    app:cardCornerRadius="@dimen/d5dp"
    app:cardElevation="@dimen/d10dp">
<Button
        android:id="@+id/signup"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_margin="@dimen/d50dp"
        android:background="@android:color/background_light"
        android:drawablePadding="@dimen/d30dp"
        android:drawableEnd="@drawable/icon_right_aero_black"
        android:minWidth="0dp"
        android:scaleType="center"
        android:text="Login"
        android:textColor="#DE000000" />
</androidx.cardview.widget.CardView>
</RelativeLayout>

```

[![CardView Inside Button with Right aero](https://i.stack.imgur.com/154Tp.png)](https://i.stack.imgur.com/154Tp.png)
You can use button drawable right or drawable end property to set image:
Also, you can use padding property to apply padding to a drawable image.

```
<Button
      android:id="@+id/imgButton"
      android:text="imageButton"
      android:drawableRight="@drawable/your_image"
      android:drawableEnd="@drawable/your_image"
      android:drawablePadding="@dimen/padding_10dp"
      android:textColor="@color/colorButton" />

```