百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CircularBarPager

> 编程语言
开源

一个 android ViewPager 封装在一个圆形进度条中

400 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个 android ViewPager 封装在一个圆形进度条中

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.daimajia.easing:library:2.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.daimajia.easing:library:2.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:

In styles.xml

 

========

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

  • We used ViewPagerIndicator from JakeWharton (https://github.com/JakeWharton/ViewPagerIndicator) for the page indicator at the bottom of the CircularBarPager
  • We used AnimationEasingFunctions from daimajia (https://github.com/daimajia/AnimationEasingFunctions) to also use beautiful animations on API 10+

========

License

…

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言