Dynamic Circle View for Android, XIAOMI Sport old version main page View.
in project build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
in module build.gradle
dependencies {
implementation 'com.github.faultaddr:DynamicCircleView:0.1.0'
}
<com.faultaddr.dynamiccircleview.DynamicCircleView
android:id="@+id/circle_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:bgColor="#333333"
app:bgPic="@drawable/main"
app:circleCount="3"
app:endColor="#000000"
app:layout_constraintEnd_toEndOf="parent"
app:lineColor="#555555"
app:startColor="#ffffff"
app:count="100" />
DynamicCircleView.ViewConfig config = new DynamicCircleView.ViewConfig();
DynamicCircleView dynamicCircleView =
config.startColor(Color.parseColor("#fffff1"))
.endColor(Color.parseColor("#c2ffec"))
.circleCount(1)
.lineColor(Color.parseColor("#c7ffec"))
.bgPic(R.drawable.main_pic)
.config(this);
// start the animation
dynamicCircleView.startScan();
- bgColor: background color
- bgPic: background picture
- circleCount: the circle count in the view
- startColor&endColor: gradient color
- lineColor: the color of line
- count: the text in the middle of the view
Feel free to dive in! open an issue or submit PRs.
DynamicCircleView follows the Contributor Covenant Code of Conduct.