Giter Club home page Giter Club logo

demoprogressviewslibapp's Introduction

Android-ProgressViewsLib

Android library with custom Progress Bars in different shapes.

example1example3example2example5 ##DemoProgressViewsLibApp DemoProgressViewsLibApp is sample app with progressviewslib, Android library which is collection of custom views that represents ProgressBars in different shapes. It is easy to understand, to integrate and to customize it. At the moment there are four different types:

-CircleProgressBar

-CircleSegmentBar

-ArcProgressBar

-LineProgressBar(vertical or horizontal)

All ProgressViews can be easy customized by your needs, through a wide range of methods or through xml.

#Implementation In https://github.com/natasam/DemoProgressViewsLibApp you have example with all four views in role of ProgressBar and how to customize them. Basic implementation through xml would be, for example for CircleProgressBar:

<com.natasa.progressviews.CircleProgressBar
            android:id="@+id/circle_progress"
            android:layout_width="130dp"
            android:layout_height="130dp"
            app:bar_width="12dp"
            app:bar_color="#b5b6b9"
            app:progress=55
            app:progress_color="#d3f115"
            app:progress_width="10dp" />

or you can add it programmatically in your class:

 CircleProgressBar circleProgressBar = new CircleProgressBar(this);
        ((ViewGroup) findViewById(R.id.rlContainer)).addView(circleProgressBar);
        circleProgressBar.setProgress(65);
        circleProgressBar.setWidth(200);
        circleProgressBar.setWidthProgressBackground(25);
        circleProgressBar.setWidthProgressBarLine(25);
        circleProgressBar.setText("Loading...");
        circleProgressBar.setTextSize(30);
        circleProgressBar.setBackgroundColor(Color.LTGRAY);
        circleProgressBar.setProgressColor(Color.RED);

set linear gradient for progress with default colors or add your array of colors:

        circleProgressBar.setLinearGradientProgress(true);
or
        circleProgressBar.setLinearGradientProgress(true, colors_array);

add progress listener on every ProgressView to track progress if you want:

circleProgressBar.setOnProgressViewListener(new OnProgressViewListener() {
            @Override
            public void onFinish() {
                //do something on progress finish
                circleProgressBar.setText("done!");
                // circleProgressBar.resetProgressBar();
            }

            @Override
            public void onProgressUpdate(float progress) {
                circleProgressBar.setText("" + (int) progress);

            }
        });
set start position for CircleProgressBar progress with setStartPositionInDegrees(ProgressStartPoint position),
or in degrees: setStartPositionInDegrees(int degrees)

set progress with rounded edges with:

   circleProgressBar.setRoundEdgeProgress(true) 

for convenience, you can always cast them as ProgressShape:

   ProgressViewFactory pv = new ProgressViewFactory(this);
        ProgressShape progres = pv.getShape(ShapeType.ARC);
        addView((View) progres);

All of them extend ProgressView class which extends View and also implements ProgressShape interface. So you have a lot of possibilities to use them as you wish.

you can set all Progress views as indeterminate progress with infinite animation and speed of animation as parametar:

       progressBar.setProgressIndeterminateAnimation(2000);

#Library Library is available here: https://github.com/natasam/android-progressviewslib

demoprogressviewslibapp's People

Contributors

natasam avatar

Watchers

James Cloos avatar Nikhil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.