Git Product home page Git Product logo

circleprogress's Introduction

CircleProgress

圆形的进度条,具有多种形态,CircleProgress的子类TickCircleProgress还具备刻度线

CircleProgress

可设置的属性

    <!-- 进度条的背景色-->
    bgColor
    进度条的前景色 起始颜色
    foreStartColor
    <!-- 进度条的前景色 结束颜色-->
   	foreEndColor 
    <!-- 进度条的大小-->
    progressWidth 
    <!-- 最大进度-->
    maxProgress
    <!-- 现在的进度-->
    currProgress
    <!-- 进度条的起始位置-->
    progressInitialPosition
    <!-- 是否使用动画-->
    useAnimation
    <!-- 使用渐变-->
    useGradient
    <!-- 边角是否是圆的-->
    isCircleCorner
    <!-- 是否是实心的-->
    isSolid format=boolean

TickCircleProgress中增加的属性

    <!-- 刻度条的粗细-->
    tickWidth 
    <!-- 刻度的颜色-->
    tickColor
    <!-- 刻度条的高度-->
    tickMarkHeight

TextCircleProgress中增加的属性

	<!-- 主标题颜色-->
    headColor
    <!-- 副标题颜色-->
    subHeadColor
    <!-- 主标题字体大小-->
    headSize
    <!-- 副标题字体大小-->
    subHeadSize
    <!-- 底部标题颜色-->
    bottomHeadColor
    <!-- 底部标题大小-->
    bottomHeadSize

最简单的使用

在布局文件中

<com.ethanco.circleprogresslibrary.CircleProgress
	xmlns:custom="http://schemas.android.com/apk/res-auto"
    android:id="@+id/myCircleProgress"
    android:layout_width="150dp"
    android:layout_height="150dp"
    custom:bgColor="@color/color_bg"
    custom:currProgress="160"
    custom:foreEndColor="@color/color2"
    custom:foreStartColor="@color/color1"
    custom:maxProgress="270"
    custom:progressInitialPosition="135"
    custom:progressWidth="12dp"
    custom:useAnimation="true" /> 

Java代码设置进度

mCircleProgress.setProgress(value);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.