CircularBarPager


Source link: https://github.com/OrangeGangsters/CircularBarPager

CircularBarPager

A Lollipop material design styled CircularBarPager library (API 10+).

To include in your project, add this to your build.gradle file:


//CircularBarPager
 compile 'com.github.orangegangsters:library:1.3.4@aar'
 //CirclePageIndicator
 compile 'com.viewpagerindicator:library:2.4.1@aar'
 //Animations and progress value easing
 compile 'com.nineoldandroids:library:2.4.0'
 compile 'com.daimajia.easing:library:1.0.1@aar' 

Starting from version 1.3.10, we are moving to a new package name (we skipped from 1.3.4 to 1.3.10):


//CircularBarPager
 compile 'com.github.omadahealth:library:1.3.11@aar'
 //CirclePageIndicator
 compile 'com.viewpagerindicator:library:2.4.1@aar'
 //Animations and progress value easing
 compile 'com.nineoldandroids:library:2.4.0'
 compile 'com.daimajia.easing:library:1.0.1@aar' 

========

By

Developers: Olivier Goutay and Stoyan Dimitrov

Designers: Daniel Waldron

Usage

Look at the example app for a live example on how to use the library.

Preparing dependencies

In order to use the CirclePageIndicator by Square, you need to add a repo to your main build.gradle file:

allprojects {

  repositories {

maven {
 url 'http://dl.bintray.com/populov/maven/' 
}

jcenter()
  
}
 
}
 

In XML:

<com.github.OrangeGangsters.circularbarpager.library.CircularBarPager

android:id="@+id/circularBarPager"

android:layout_height="match_parent"

android:layout_width="match_parent"

android:paddingLeft="30dp"

android:paddingRight="30dp"

android:layout_centerInParent="true"

style="@style/CircularBarPagerStyle"/> 

In styles.xml

 <style name="CircularBarPagerStyle">

<item name="android:layout_height">match_parent</item>

<item name="android:layout_width">match_parent</item>

 <item name="progress_arc_max">100</item>

<item name="arc_progress">0</item>

<item name="progress_arc_clockwise_outline_width">0.75dp</item>

<item name="progress_arc_counter_clockwise_outline_width">0.75dp</item>

<item name="progress_arc_clockwise_width">8dp</item>

<item name="progress_arc_counter_clockwise_width">8dp</item>

<item name="progress_start_line_enabled">true</item>

<item name="progress_pager_on_click_enabled">true</item>

<item name="progress_pager_fill_circle_color">#00000000</item> </style> 

========

Customization

You can change several attributes in the XML file:

  • app:arc_progress [integer def:0 0-100] --> The default arc progress when start up
  • app:progress_arc_max [integer def:100 0-100] --> The maximum arc progress
  • app:progress_arc_clockwise_color [color hex] --> The main color in clockwise mode
  • app:progress_arc_clockwise_outline_color [color hex] --> The outline color in clockwise mode
  • app:progress_arc_counter_clockwise_color [color hex] --> The outline color in counter-clockwise mode
  • app:progress_arc_counter_clockwise_outline_color [color hex] --> The outline color in counter-clockwise mode
  • app:progress_arc_clockwise_width [integer dp] --> The width size of the main color in clockwise mode
  • app:progress_arc_clockwise_outline_width [integer dp] --> The width size of the outline color in clockwise mode
  • app:progress_arc_counter_clockwise_width [integer dp] --> The width size of the color in counter-clockwise mode
  • app:progress_arc_counter_clockwise_outline_width [integer dp] --> The width size of the outline color in counter-clockwise mode
  • app:progress_pager_on_click_enabled [boolean] --> The boolean that enables or disables the click enabled (on click, changes page)
  • app:progress_start_line_enabled [boolean] --> The boolean that enables the line that displays the starting position of the pager
  • app:progress_pager_on_click_enabled [boolean] --> The boolean that enables the user to change pages with a click as well as a slide
  • app:progress_pager_fill_circle_color [color hex] --> The color to fill the circle, transparent as default
  • app:progress_pager_fill_mode [enum int] --> The mode to fill the circle, "default_mode" or "pie_mode"

You can access every components programmatically by getting the CircularBarPager object:

CircularBarPager mCircularBarPager = (CircularBarPager) findViewById(R.id.circularBarPager);
 CircularBar circularBar = mCircularBarPager.getCircularBar();
 ViewPager viewPager = mCircularBarPager.getViewPager();
 CirclePageIndicator circlePageIndicator = mCircularBarPager.getCirclePageIndicator();
 

========

Credits

========

License

The MIT License (MIT)  Copyright (c) 2015 OrangeGangsters  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 

Resources

Drag & Drop GridView on Android.

If you are tired of constantly having to set up progress bars, empty views and error views, than this library is for you.

Quick solutions for Android ORM.

A different beautiful ViewPager, with quick swipe controls.

ColorPickerView is an android custom view, you can pick one colour from a gridview. You can define the columns, colours, border colour, etc.

A mini elegant WebView for fast easy access.

Feature list:

  • no more memory leak
  • easy web page margin fixed
  • easy web video implementation
  • easy web content display implementation
  • took care of life cycle issues
  • fantasy animation reveal fade in

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