CUSTOM SHAPES-IN DRAWABLE

===============================================
XML FILE
================================================
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">


    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button"
        android:background="@drawable/ring_button"
        tools:layout_editor_absoluteX="48dp"
        tools:layout_editor_absoluteY="52dp" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/stroke_dashedlinearoundutton"
        android:text="Button"
        tools:layout_editor_absoluteX="206dp"
        tools:layout_editor_absoluteY="109dp" />

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/upone_downone"
        android:text="Button"
        tools:layout_editor_absoluteX="48dp"
        tools:layout_editor_absoluteY="197dp" />

    <Button
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/solid_ring"
        android:text="Button"
        tools:layout_editor_absoluteX="218dp"
        tools:layout_editor_absoluteY="206dp" />

    <Button
        android:id="@+id/button4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/lineshaped"
        android:text="Button"
        tools:layout_editor_absoluteX="48dp"
        tools:layout_editor_absoluteY="346dp" />

    <Button
        android:id="@+id/button5"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/roundcornered_colorgradient"
        android:text="Button"
        tools:layout_editor_absoluteX="218dp"
        tools:layout_editor_absoluteY="359dp" />

</android.support.constraint.ConstraintLayout>
==========================================

drawable->rightclick->new->drwable resource file->give file name->root element=shape
for given files below

===================================================
lineshaped
====================================================

<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="line">
<!--   shape=oval,ring >-->
    <stroke
        android:width="20dp"
        android:color="#b71c1c" />

</shape>
=========================================================

solid_ring
==========================================================
<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:innerRadius="8dp"
    android:shape="ring"
    android:thickness="30dp"
    android:useLevel="false">
    <gradient
        android:angle="0"
        android:centerX="0.1"
        android:centerY="0.1"
        android:centerColor="#b60862"
        android:startColor="#ba68c8"
        android:endColor="#dd2c00"
        android:gradientRadius="120"
        android:type="sweep"/>
    <padding android:bottom="50dp"
        android:left="16dp"
        android:right="16dp"
        android:top="50dp"/>
</shape>
==================================================================

upone_downone
==================================================================
<?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:innerRadius="0dp"
        android:shape="ring"
        android:thickness="40dp"
        android:useLevel="false">
        <gradient
            android:angle="0"
            android:centerX="0.2"
            android:centerY="0.6"
            android:centerColor="#b60862"
            android:startColor="#ba68c8"
            android:endColor="#dd2c00"
            android:gradientRadius="120"
            android:type="sweep"/>
        <padding android:bottom="50dp"
            android:left="16dp"
            android:right="16dp"
            android:top="50dp"/>
</shape>
=====================================================================

stroke_dashedlinearoundutton
==============================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:angle="0"
        android:centerX="0.1"
        android:centerY="0.1"
        android:centerColor="#1976d2"
        android:startColor="#00e5ff"
        android:endColor="#6200ea"
        android:gradientRadius="100"
        android:type="linear"/>
    <padding
        android:left="5dp"
        android:top="4dp"
        android:right="4dp"
        android:bottom="4dp" />
    <corners
        android:radius="6dp" />
    <stroke android:color="@color/black"
        android:width="4dp"
        android:dashGap="4dp"
        android:dashWidth="8dp"/>
</shape>
===========================================================

roundcornered_colorgradient
=========================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <gradient
        android:angle="0"
        android:centerX="0.1"
        android:centerY="0.1"
        android:centerColor="#1976d2"
        android:startColor="#00e5ff"
        android:endColor="#6200ea"
        android:gradientRadius="100"
        android:type="linear"
<!--    android:type="sweep"
 android:type="radial"
 options are: Linear, Radial, Angle, Reflected and Diamond,-->
        />
    <padding android:left="5dp"
        android:top="4dp"
        android:right="4dp"
        android:bottom="4dp" />
    <corners android:radius="6dp" />
</shape>
============================================================

ring_button
=============================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:innerRadius="20dp"
    android:shape="ring"
    android:thickness="10dp"
    android:useLevel="false">
    <solid android:color="@color/purple_200" />
    <padding android:bottom="50dp"
        android:left="16dp"
        android:right="16dp"
        android:top="50dp"/>>
</shape>
=============================================================================