Git Product home page Git Product logo

zprogressbar's Introduction

ZProgressBar

A customized Android ProgressBar.

demo

Install

Latest Version:

implementation 'com.zpj.progressbar:ZProgressBar:latest_version'

How to use?

example

<com.zpj.progressbar.ZProgressBar
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="8dp"
            app:zbp_radius="12dp"
            app:zbp_border_color="#c0f2d9"
            app:zbp_progress_bar_width="3.5dp"
            app:zbp_intermediate_mode="true"
            app:zbp_progress_bar_color="#2ad181"
            />

Attrs

<declare-styleable name="ZProgressBar">
        <!--ProgressBar进度-->
        <attr name="zbp_progress" format="integer" />
        <!--ProgressBar最大进度,默认为100-->
        <attr name="zbp_max_progress" format="integer" />
        <!--ProgressBar最小进度,默认为10,仅在intermediate模式下有效-->
        <attr name="zbp_min_progress" format="integer" />
        <!--圆形ProgressBar半径,默认20dp-->
        <attr name="zbp_radius" format="dimension" />
        <!--ProgressBar背景色,默认透明-->
        <attr name="zbp_background_color" format="color" />
        <!--ProgressBar边框粗细,默认和zbp_progress_bar_width相等-->
        <attr name="zbp_border_width" format="dimension" />
        <!--ProgressBar边框颜色,默认透明-->
        <attr name="zbp_border_color" format="color" />
        <!--ProgressBar粗细,默认4dp-->
        <attr name="zbp_progress_bar_width" format="dimension" />
        <!--ProgressBar颜色,默认为colorPrimary-->
        <attr name="zbp_progress_bar_color" format="color" />
        <!--intermediate模式,是否精确显示,false表示精确显示进度,true表示不精确显示进度-->
        <attr name="zbp_intermediate_mode" format="boolean" />
        <!--进度文字颜色,默认黑色-->
        <attr name="zbp_progress_text_color" format="color" />
        <!--进度文字大小,默认自动适应文字大小-->
        <attr name="zbp_progress_text_size" format="dimension" />
        <!--是否显示进度文字,在非intermediate模式下有效-->
        <attr name="zbp_show_progress_text" format="boolean" />
</declare-styleable>

zprogressbar's People

Contributors

z-p-j avatar

Watchers

James Cloos avatar

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.