Codes

mail@pastecode.io avatar
unknown
plain_text
4 years ago
753 B
1112
Indexable
Never
Make new drawable

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@android:id/background">

    <shape>

        <corners android:radius="100dp"/>

        <solid android:color="#EEEEEE"/>

    </shape>

</item>

<item android:id="@android:id/progress">

    <scale android:scaleWidth="100%">

       <shape>

            <corners android:radius="100dp"/>

            <solid android:color="#1FA2FF"/>

        </shape>

    </scale>

</item>

</layer-list>

Attach to ProgressBar.

android:progressDrawable="@drawable/circle"

Or

progressbar1.setProgressDrawable(get Drawable(R.drawable.round_progress));