Code Monkey home page Code Monkey logo

circularprogressview's Introduction

CircularProgressView

A circular progressview for android

Android Arsenal

About

This is a simple small class that renders a progress in form of an filling arc shape. A progress text can be rendered additionally. This text is rendered in the secondary color for the 'done' area of the arc.

I used it for rendering the progress that is done in the background of all views. This view has no dependencies and min SDK version 3 can be used.

It also supports a custom font (that is places in the 'assets' directory) and fading of the progress view (even though I recommend setting the 'fadeTime' value to -1 and use a Fragment with a FragmentTransation to fade this view in and out).

All values are optional. If you want to reuse the view from the code, simply set the class members in the CircularProgressView class accordingly.

alt text

XML Attributes

Following XML attributes are allowed

<momentum.circularprogressview.CircularProgressView
	progressColor=		"#FFFFFF"
	progressText=		"TEST PROGRESS"
	progressTextColor=	"#ff5aa74a"
	progressTextFont=	"consolab.ttf"
	progressTextSize=	"36"
	borderOffset=		"150"
	fadeTime=			"500" />

progressColor:

The main color of the progress ARC. The text will be rendered in this color where the arc is not yet painted

progressText:

The Text to be rendered

progressColor:

The secondary color. Used for the text on top of the alredy rendered progress

progressTextFont:

An optional ttf or otf font This font hast to be in the "assets" directory

progressTextSize:

The font size

borderOffset:

Optional border offset, next iteration will kick this, its just a fix to fill the corners (will be deprecated in next version)

fadeTime:

The fade in and fade out time, can be set to -1 to ignore fading

Example Application

  • An example application is included in the github repository. It can also be downloaded from the playstore soon.

Precompiled AAR

You can download the latest precompiled version here https://github.com/momentumlab/CircularProgressView/blob/master/aar/circularprogressview-v1.0.2.aar

Additional information

  • Set the progress to 0 (at the beginning) and 1 (at the end).
  • 'wrapcontent' for dimensions is not yet supported
  • Aliasing problem will be fixed soon

License

Check file LICENSE and Make sure to follow the licensing terms and conditions of the project and the software used to build the project.

Feedback

If you have any questions or feedback, feel free to get back to me!

circularprogressview's People

Contributors

mlostekk avatar

Watchers

James Cloos avatar Rehan Kodekar 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.