Dashed Circular Progress


Source link: https://github.com/glomadrian/dashed-circular-progress

Dashed Circular Progress

A Circular progress animated where you can put any view inside

## Minimal SDK Version

The minimal sdk supported version is 11

Example

Usage

<com.github.glomadrian.dashedcircularprogress.DashedCircularProgress
android:id="@+id/simple"
android:layout_width="match_parent"
android:layout_height="match_parent"

custom:external_color="#1affffff"
custom:base_color="#6effffff"
custom:min="0"
custom:max="999"
custom:progress_color="#000000"
custom:progress_icon="@drawable/my_awesome_icon"
custom:duration="3500" >
//Put here any view you like to be inside progress bar  </com.github.glomadrian.dashedcircularprogress.DashedCircularProgress> 

Remember

Remember put this for custom attribute usage

xmlns:custom="http://schemas.android.com/apk/res-auto" 

Custom attributes

  • External color: The color of the outside line
custom:external_color="#1affffff" 
  • Base color: The color base of the progress bar
custom:base_color="#6effffff" 
  • Progress color: The color of the progress line
custom:progress_color="#000000" 
  • Progress icon: The icon that appears on top
custom:progress_icon="@drawable/my_awesome_icon" 
  • Min: Minimum value for progress
custom:min="0"
  • Max: Maximun value for progress
custom:max="999"
  • Duration: Animation duration time in milliseconds
custom:duration="1000"
custom:progress_stroke_width="48" // see the simple.xml example for setting the width thicker 

More xml examples

Code Usage

Attributes

dashedCircularProgress.setExternalColor(awesomeColor);
 dashedCircularProgress.setProgressColor(awesomeColor2);
 dashedCircularProgress.setInternalBaseColor(awesomeColor3);
 dashedCircularProgress.setDuration(2000);
 dashedCircularProgress.setIcon(awesomeIcon);
 dashedCircularProgress.setMin(min);
 dashedCircularProgress.setMax(max);
 

Animation

dashedCircularProgress.setInterpolator(interpolator);
 

Update Listener

dashedCircularProgress.setOnValueChangeListener(new DashedCircularProgress.OnValueChangeListener() {

  @Override

  public void onValueChange(float value) {

  //Your code here

  
}

 
}
);
 

Reset, set the value to 0 without animation

  dashedCircularProgress.reset();

Transformer

If you put a viewpager inside the Dashed Circular Progress maybe want to use a fade in / out on page change for a more comfortable user experience, use this transformer in your adapter (included in the library)

com.github.glomadrian.dashedcircularprogress.utils.ViewPagerTransformer  viewPager.setPageTransformer(true, new ViewPagerTransformer());

Gradle

Repository

repositories {

maven {

  url "http://dl.bintray.com/glomadrian/maven"

}
 
}

Dependency

  compile 'com.github.glomadrian:DashedCircularProgress:1.0@aar'

Developer By

Adrián García Lomas

License

Copyright 2015 Adrián García Lomas

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Resources

Gradle plugin developed to facilitate screenshot testing for Android.

A sweet, small set of Kotlin functions to reduce your android boilerplate code.

A simple android view for numeric progress selection.

Page indicators for use with ViewPagers.

The EasyBluetooth library allows the fast creation of Bluetooth connections between devices.

Chain of Command with background foreground options. Chains can be pre-constructed, and reused any number of times. Individual commands can be written as lambdas, or as classes.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes