Skip to content

ydcool/ProgressImageView

Repository files navigation

Android ProgressImageView

Download Build Status

An iOS style progress ImageView.

Demo

demo

Demo apk download

or scan demo

Install

gradle :

    dependencies {
        compile 'me.ydcool.lib:progressimageview:latest.integration'
    }

Usage

in your layout xml:

<me.ydcool.lib.progressimageview.ProgressImageView
        android:id="@+id/Main_piv"
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:src="@mipmap/ic_launcher"
        app:pi_mask_color="#CC233333"
        app:pi_progress="0"
        app:pi_radius="60dp"
        app:pi_stroke="6dp"/>

setter and getter:

    //setter
    progressImageView.setProgress(yourProgress);
    
    //getter
    int currentProgress = progressImageView.getProgress();

Attributes

attr description
pi_mask_color mask color.argb will looks better. default is Color.argb(180,0,0,0)
pi_progress the progress ,default is 0.
pi_radius the radius of inner circle. default is 1/4 of the min side.
pi_stroke stroke for the transparent ring.default is 8dp.

TODO

  • support for pause and resume

License

Apache License 2.0

About

An iOS style progress ImageView for Android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages