DashboardView

by SuperKung

SuperKung / DashboardView

Android 自定义View 仪表盘

430 Stars 85 Forks Last release: almost 4 years ago (1.2.1) 34 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

DashboardView

Android 自定义View 仪表盘

DashboardView

HOW TO USE

gradle

root build.gradle:

Groovy
allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }
moudle build.gradle:
Groovy
compile 'com.github.SuperKung:DashboardView:1.2.1'

xml

more
  app:startNumber
  app:maxNumber
  app:backgroundColor
  app:progressColor
  app:startProgressColor
  app:endProgressColor
  app:progressStrokeWidth
  app:tikeStrArray
  app:tikeStrColor
  app:tikeStrSize
  app:startNumber
  app:maxNumber
  app:centerCircleColor

java

setPercent(int percent);//核心方法,percent = 0~100
//以下方法都可有可无,如果在xml中设置了则不必重复设置,适用于需要动态改变状态的情况
setText(String text);
setTextSize(int size);
setTextColor(int mTextColor);
setProgressHeight(int dp);
setUnit(String unit);
setInterpolator(TimeInterpolator interpolator);//设置动画插值器,从而达到不同的动画效果
setStartColor(int startColor);
setEndColor(int endColor);//如果设置了起始颜色和结束颜色,进度条会变成渐变色
setStartNum(float startNum);
setMaxNum(float startNum);

该控件相关博客

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.