ElasticDownload

We implemented it with a custom view, playing with canvas rotation and path drawing.

fail

System Requirement

Android v2.2+

Usage

Grab it from maven:

    compile 'com.github.tibolte:elasticdownload:1.0.+'

Declare this view in your layout like below, it's also possible to inflate it manually.

    <is.arontibo.library.ElasticDownloadView
        android:id="@+id/elastic_download_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"/>

At first, call startIntro() to make the view be able to display any percentage:

    @InjectView(R.id.elastic_download_view) ElasticDownloadView mElasticDownloadView;
    
    mElasticDownloadView.startIntro();

Set any progress:

    mElasticDownloadView.setProgress(25);

Notify if the download has failed or not:

    mElasticDownloadView.success(); //This function moves the cursor to 100 if the progress has not been set already
    
    mElasticDownloadView.fail();

GitHub