Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

ViewPagerIndicator

> 编程语言
Open source

一个简单好用的ViewPagerIndicator,提供了六种类型,为viewpager添加酷炫效果,并且支持轮播图( A simple, cool, customizable ViewPagerIndicator.show cool indicator for viewpager , it also good

396 stars0 likes2 views
WebsiteGitHub

About

一个简单好用的ViewPagerIndicator,提供了六种类型,为viewpager添加酷炫效果,并且支持轮播图( A simple, cool, customizable ViewPagerIndicator.show cool indicator for viewpager , it also good

ViewPagerIndicator

一个简单好用的ViewPagerIndicator,提供了五种类型,采用在XML布局中定制颜色大小等参数,在JAVA代码中只需二行代码就能为viewpager添加酷炫效果,并且支持轮播图。

文档

  • English
  • 中文

如何使用它?

先在 project的build.gradle 添加:

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

然后在module的build.gradle 添加:

support for androidx:

dependencies {
	        implementation 'com.github.LinweiJ:ViewPagerIndicator:0.3.0'
	}

support for support:(使用android studio的Refactor->Migrate to AndroidX,也可以支持AndroidX)

dependencies {
	        implementation 'com.github.LinweiJ:ViewPagerIndicator:0.2.0'
	}

使用

1 . 将ViewPagerIndicator 添加到xml

Properties:

  • app:vpi_selected_color
  • app:vpi_default_color (如果 indicatorType=CIRCLE_LINE default_color 为指示器唯一颜色 ,selected_color 不起作用)
  • app:vpi_radius (点的大小,在indicatorType= CIRCLE_LINE 的情况下 radius 是点的高)
  • app:vpi_radius_selected (只作用在indicatorType= CIRCLE 的情况下,为选中点的大小,默认为radius大小)
  • app:vpi_length (只作用在 indicatorType=CIRCLE_LINE 的情况下,为 指示器点的长度)
  • app:vpi_distance (只作用在 distanceType=BY_DISTANCE 的情况下)
  • app:vpi_num
  • app:vpi_indicatorType (LINE; CIRCLE; CIRCLE_LINE; BEZIER;SPRING)

​ LINE:线 ; CIRCLE:圆点(默认) ; CIRCLE_LINE:圆角矩形; BEZIER:弹性球 ; SPRING: 弹簧粘性球; PROGRESS: 进度条

  • app:vpi_distanceType (BY_RADIUS; BY_DISTANCE ; BY_LAYOUT )

​ BY_RADIUS:3倍radius ; BY_DISTANCE :定义固定距离 ;BY_LAYOUT :根据layout_width均分得到距离

  • app:vpi_animation(默认为true:动画开启 ; false:关闭动画)

2 . java

…

3.更多

可以参考 demo/ 示例

License

Copyright 2017 LinWeiJia

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.

底部

随手给颗星呗 ? (>_@)

Issues· 9 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaandroidxbazierindicatorviewpager

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

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