No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
images
.gitignore
README.md
RippleProgress.iml
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

HorizontalProgressBar


HorizontalProgressBar is similar to the progressbar in GoogleNow application. It is simple, customizable horizontal indeterminate ProgressBar and easy to use. This repo has example usage.

![HorizontalProgressbar] (images/horizontalprogress.gif)

Usage

  • Add the ProgressLayout.java and its dependencies to your project.

######Dynamically Add a ProgressLayout to the xml layout:

     <com.incredibleandros.rippleprogress.ui.ProgressLayout
             android:id="@+id/progress"
             android:layout_width="match_parent"
             android:layout_height="4dp"
             android:layout_centerHorizontal="true"
             android:layout_alignTop="@id/layout" />

create a object for ProgressLayout & configure color codes you want

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        progress = (ProgressLayout) findViewById(R.id.progress);

        progress.setColorScheme(android.R.color.holo_blue_bright,
                        android.R.color.holo_green_light,
                        android.R.color.holo_orange_light,
                        android.R.color.holo_red_light);

        //...
    }

use the following method to show / hide progress

    progress.setRefreshing(true);  //true  --  show progress
                                   //false --  hide progress

######Example

        button.setOnClickListener(new View.OnClickListener() {

                    @Override
                    public void onClick(View v) {
                        // TODO Auto-generated method stub
                        if (progress.isRefreshing()) {
                            progress.setRefreshing(false);
                        }
                        else{
                            progress.setRefreshing(true);
                        }
                    }
                });