Circle Progress Android


Source link: https://github.com/Adilhusen/circle-progress-ad-android

This is a library allowing you to have a smooth and customizable circular ProgressBar.

circle-progress-ad-android

A small Android library allowing you to have a smooth and customizable circular ProgressBar like whatsapp and Tez app, it can be use while uploding or downloading file.

I decided to do this because I was really tired to find progressbar like whatsapp and gradient color progressbar and also you can contribute more color style, or new idea to me.

I took reference or take some code from CircleProgress and change it as i need. also add code for set vector image as background and gradient colors.

AdProgressBar

Integration

Add it in your root build.gradle at the end of repositories:

allprojects {
 		repositories {
 			... 			maven {
 url  https://jitpack.io  
}
 		
}
 	
}
 

Add the dependency:

implementation  com.github.Adilhusen:circle-progress-ad-android-:1.0 

Usage

You can either simply use the AdCircleProgress widge from this library on a regular ProgressBar.

Using Widget

Simply replace your ProgressBar with AdCircleProgress, and remember to apply corresponding style and attribute for correct behavior.

For example, to create a first AdCircleProgress like whatsapp:

AdProgressBarFirst

<com.app.adprogressbarlib.AdCircleProgress

android:id="@+id/pgb_progress"

android:layout_width="60dp"

android:layout_height="60dp"

android:backgroundTintMode="add"

app:adpgb_finished_color="@color/colorAccent"

app:adpgb_unfinished_color="@android:color/white"

custom:adpgb_finished_stroke_width="5dp"

custom:adpgb_inner_drawable="@drawable/ic_close_icon"

custom:adpgb_show_text="false"

custom:adpgb_unfinished_stroke_width="5dp" />

Second AdCircleProgress in which you can change adpgb_finished_stroke_width like below code:

AdProgressBarSecond

<com.app.adprogressbarlib.AdCircleProgress

android:id="@+id/pgb_progress2"

android:layout_width="60dp"

android:layout_height="60dp"

android:backgroundTintMode="add"

app:adpgb_finished_color="@color/colorPrimary"

app:adpgb_background_color="@android:color/transparent"

app:adpgb_unfinished_color="@android:color/white"

custom:adpgb_finished_stroke_width="10dp"

custom:adpgb_show_text="false"

custom:adpgb_unfinished_stroke_width="5dp" />

Third AdCircleProgress in which you can change custom:adpgb_inner_drawable means you can change image or vector image in inner circle like below code:

AdProgressBarThird

<com.app.adprogressbarlib.AdCircleProgress

android:id="@+id/pgb_progress3"

android:layout_width="60dp"

android:layout_height="60dp"

app:adpgb_background_color="@android:color/holo_red_dark"

android:backgroundTintMode="add"

app:adpgb_finished_color="@android:color/white"

app:adpgb_unfinished_color="@android:color/holo_red_dark"

custom:adpgb_finished_stroke_width="5dp"

custom:adpgb_inner_drawable="@drawable/ic_delete_icon"

custom:adpgb_show_text="false"

custom:adpgb_unfinished_stroke_width="5dp" />

Fourth AdCircleProgress in which you can change custom:adpgb_show_text="true" means if you want to show progress in percentage like below code:

AdProgressBarFourth

<com.app.adprogressbarlib.AdCircleProgress

android:id="@+id/pgb_progress4"

android:layout_width="60dp"

android:layout_height="60dp"

app:adpgb_background_color="@android:color/background_light"

android:backgroundTintMode="add"

app:adpgb_finished_color="@android:color/white"

app:adpgb_unfinished_color="@android:color/holo_red_light"

custom:adpgb_finished_stroke_width="5dp"

app:adpgb_text_size="12dp"

custom:adpgb_show_text="true"

app:adpgb_text_color="@android:color/holo_red_light"

custom:adpgb_unfinished_stroke_width="5dp" />

Fifth AdCircleProgress in which you can add gradient color for progressbar app:adpgb_gradient_color_one="@color/colorOne" app:adpgb_gradient_color_two="@color/colorTwo"like below code:

AdProgressBarFifth

<com.app.adprogressbarlib.AdCircleProgress

android:id="@+id/pgb_progress5"

android:layout_width="60dp"

android:layout_height="60dp"

app:adpgb_background_color="@android:color/transparent"

android:backgroundTintMode="add"

app:adpgb_finished_color="@android:color/white"

app:adpgb_gradient_color_one="@color/colorOne"

app:adpgb_gradient_color_two="@color/colorTwo"

app:adpgb_unfinished_color="@android:color/transparent"

custom:adpgb_finished_stroke_width="5dp"

app:adpgb_progress="90"

app:adpgb_text_size="12dp"

custom:adpgb_show_text="false"

custom:adpgb_unfinished_stroke_width="5dp" />

Do not forget to add xmlns:custom custom attr in your root layout :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 xmlns:app="http://schemas.android.com/apk/res-auto"
 xmlns:custom="http://schemas.android.com/apk/res-auto"
 xmlns:tools="http://schemas.android.com/tools"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:background="@drawable/backg"
 android:padding="20dp"
 tools:context=".MainActivity">  </RelativeLayout>

Resources

Log to a sql database for debugging. View the logs in-app with the LogViewerActivity.

RxComprehensions is a library to reduce boilerplate and simplify your Observable chains.

An easy implementation of Google Places API in Android.

A reactive extension to generate URL previews.

An Android Annotations plugin to support the Greenrobot Eventbus.

KotlinTest is a flexible and comprehensive testing tool for the Kotlin ecosystem based on and heavily inspired by the superb Scalatest. KotlinTest provides several ways to lay out your test so that your team can pick the style they are most happy with. It also includes many matchers which allow you to write many different types of assertions easily and in a human readable way. Finally, there's helpers for things like collection testing, and future testing.

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