Skip to content

faultaddr/DynamicCircleView

Repository files navigation

DynamicCircleView

LICENSE 996.icu

Dynamic Circle View for Android, XIAOMI Sport old version main page View.

Display of results

How to Use

in project build.gradle

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

in module build.gradle

dependencies {
        implementation 'com.github.faultaddr:DynamicCircleView:0.1.0'
}

Using DynamicCircleView in xml

<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" />

Using DynamicCircleView in Java

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();

Attributes:

  • 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

Maintainers

@faultaddr

Star History

Star History Chart

Contributing

Feel free to dive in! open an issue or submit PRs.

DynamicCircleView follows the Contributor Covenant Code of Conduct.

License