Skip to content

thundeGG/VarietyMonsterProgress

Repository files navigation


Platform API License: MIT Release

Usage

  1. In your root build.gradle:
allprojects {
repositories {
    jcenter()
    maven { url "https://jitpack.io"; }
}
}
  1. In your library/build.gradle add:
compile 'com.github.7hundeR:VarietyMonsterProgress:v1.0'

XML

<com.thunder.varietymonsterprogress.VarietyMonsterProgress
        android:layout_width="300dp"
        android:layout_height="80dp"
        android:layout_marginTop="10dp"
        app:count="10"
        app:normalColor="@color/c_bdbdbd"
        app:radius="100"
        app:selected="7"
        app:selectedColor="@color/c_00A5FE"/>

Java

VarietyMonsterProgress mProgress = (VarietyMonsterProgress) findViewById(R.id.progress);
        mProgress.setCount(6);
        mProgress.setSelected(2);
        mProgress.setRadius(50);
        mProgress.setSelectedColor(getResources().getColor(R.color.c_00A5FE));
        mProgress.setNormalColor(getResources().getColor(R.color.c_bdbdbd));
        mProgress.setSpacing(20);

Attributes


XML Attribute Java set method Functionality
count setCount(int count) Set the total number of the VarietyMonsterProgress
selected setSelected(int selected) Set the current progress of the VarietyMonsterProgress
spacing setSpacing(float spacing) Set the spacing between each
radius setRadius(float radius) Set each fillet
selectedColor setSelectedColor(int selectedColor) Sets the selected color
normalColor setNormalColor(int normalColor) Sets the default color

Examples

About

一个多变的progress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages