Giter Club home page Giter Club logo

two-level-circular-progress-bar's Introduction

Android Two Level Circular Progress Bar

A simple widget extending android.view.View that allows a circular progress bar, with multiple customizations and also a possibility to add a image to its center.

Application screenshot

License

Use it the way you want it :)

Layout

Make sure you have attrs.xml

Xml declaration

<br.com.gilson.tlcpb.widget.TwoLevelCircularProgressBar
    android:layout_width="100dp"
    android:layout_height="100dp"
    app:tlcp_drawable="@drawable/ic_bike"
    app:tlcp_progress_color="@color/blue"
    app:tlcp_strokeWidth="15dp"/>

Attributes

There are some attributes defined in the attrs.xml.
tlcp_bg_color - defines the circular progress background
tlcp_drawable - defines the centralized image
tlcp_progress_color - defines the first progress bar color
tlcp_progress2_color - - defines the second progress bar color
tlcp_strokeWidth - defines the circle stroke width
tlcp_progress - defines the first progress value (0 / 100)
tlcp_progress2 - defines the second progress value (0 / 100)

Usage

Inorder to set the circularProgressBar attribute from the xml, make sure your layout xml contains an additional namespace.

xmlns:app="http://schemas.android.com/apk/res/your_package_name"

Progression level:

myCircularProgress.setProgressValue(value)
myCircularProgress.setProgress2Value(value)

What's next

  • Centralized text
  • Text bellow image

two-level-circular-progress-bar's People

Contributors

grmaciel avatar

Watchers

James Cloos avatar Ashish Patil 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.