Skip to content

Basic Android custom progress bar which allows to change progress images via XML for an easier configuration( API 15 and up)

Notifications You must be signed in to change notification settings

FranAguilera/franjam-custom-progress-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

franjam-custom-progress-bar

The purpose of this library is to have an easily configurable ProgressBar via xml which allows to change top progress drawable and background drawable.

For ussage, after import:

  1. Add to the root of your main xml layout
  xmlns:app="http://schemas.android.com/apk/res-auto"
  1. Declare your custom-progress-bar on your xml like this:
  <franjam.ui.FranJamProgressBar
        android:id="@+id/custom_progress_bar"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:visibility="visible"
        app:maxLevel="200"
        app:backgroundDrawable="@drawable/custom_background_drawable"
        app:progressDrawable="@drawable/custom_progress_vector_drawable" />
  1. XML attributes:
  • maxLevel: Define the max progress possible value. If not specified max will be 100 (Only positive values)
  • backgroundDrawable: Specify drawable (or svg) for a background image progress
  • progressDrawable: Specify drawable (or svg) for a main progress (ClipDrawable)

NOTE: If drawables are not specified in xml it will use default_progress.png and default_background.png

  1. Default images demo:

Default sample 1

Default sample 2

Default sample 3

Default sample 4

About

Basic Android custom progress bar which allows to change progress images via XML for an easier configuration( API 15 and up)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages