custom progress layout view for Android
Branch: master
Clone or download
Latest commit a481ddc Sep 18, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Checkstyle fix Sep 17, 2015
art Library added. Sep 16, 2015
config/checkstyle merged #4 Sep 17, 2015
gradle/wrapper Library added. Sep 16, 2015
library Checkstyle fix Sep 17, 2015
.gitignore Refactory Sep 17, 2015
.travis.yml Trigger commit. Sep 17, 2015
README.md Add Travis CI badge Sep 17, 2015
build.gradle Checkstyle fix Sep 17, 2015
gradle.properties cleanup Sep 17, 2015
gradlew Library added. Sep 16, 2015
gradlew.bat Library added. Sep 16, 2015
settings.gradle cleanup Sep 17, 2015

README.md

ProgressLayout

Custom Progress Layout for Android

Build Status Join the chat at https://gitter.im/iammert/ProgressLayout

Here is the youtube link

XML Definition

 <co.mobiwise.library.ProgressLayout
        android:id="@+id/progressLayout"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        app:maxProgress="100"
        app:autoProgress="true"
        app:emptyColor="#152430"
        android:layout_centerVertical="true"/>

Attributes to use

<co.mobiwise.library.ProgressLayout
...
app:maxProgress="100"
app:autoProgress="true"
app:emptyColor="#152430"
app:loadedColor="#11FFFFFF"
...
/>

Use

ProgressLayout progressLayout = (ProgressLayout) findViewById(R.id.progressLayout);
//Start it
progressLayout.start();
//pause it
progressLayout.stop();
//cancel it
progressLayout.cancel();

Methods

progressLayout.setMaxProgress(120);
progressLayout.setCurrentProgress(64);
boolean isPlaying = progressLayout.isPlaying();
//If you dont want to auto progress and handle it yourself
progressLayout.setAutoProgress(false);

Listener

progressLayout.setProgressLayoutListener(new ProgressLayout.ProgressLayoutListener() {
    @Override
    public void onProgressCompleted() {
        //TODO completed
    }

    @Override
    public void onProgressChanged(int seconds) {
        //TODO progress seconds changed.
    }
});

Gradle

Add it to your project build.gradle

 repositories {
     // ...
     maven { url "https://jitpack.io" }
 }

Add it to your app module build gradle.

dependencies {
     compile 'com.github.iammert:ProgressLayout:a2ac196500'
}

Design

I inspired from this design which is designed by Anatoly Nesterov

License

Copyright 2015 Mert Şimşek.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.