Git Product home page Git Product logo

progressbar's Introduction

Readme

本开源项目是各种自定义进度条——ProgressBar。
工程下的ProgressBar是进度条源码,app是demo演示

用法

Android Studio:

1、 在工程根目录build.gradle的仓库里,添加jitpack仓库地址

allprojects {
    repositories {

        // +++添加jitpack仓库地址
        maven {url "https://jitpack.io"}

2、 在module的build.gradle里,添加依赖

dependencies {
    // +++添加依赖
    compile 'com.github.zjun615:ProgressBar:v1.1'

##目录

##更新 v1.1:优化百分比的显示,使其苗条点
苗条点的百分比
v1:圆形圆点进度条

##1-圆形圆点进度条 ###1_1-三种显示模式

三种显示模式

模拟加载动画:

模拟加载动画

###1_2-使用 上面三种显示模式分别对应着如下布局:

<!--先在基布局中添加命名空间:xmlns:zjun="http://schemas.android.com/apk/res-auto"-->
<RelativeLayout
    xmlns:zjun="http://schemas.android.com/apk/res-auto"
    ...
    >
    
<!--默认显示-->
<com.zjun.progressbar.CircleDotProgressBar
    android:id="@+id/bar_percent"
    android:layout_width="200dp"
    android:layout_height="100dp"
    android:layout_margin="10dp"
    android:background="#94aac1"
    />
    
<!--空显示-->
<com.zjun.progressbar.CircleDotProgressBar
    android:id="@+id/bar_null"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:layout_below="@+id/bar_percent"
    android:layout_margin="10dp"
    android:background="#94aac1"
    zjun:dotColor="@android:color/holo_green_dark"
    zjun:dotBgColor="@android:color/holo_red_light"
    zjun:showMode="NULL"
    />
    
<!--全显示-->
<com.zjun.progressbar.CircleDotProgressBar
    android:id="@+id/bar_all"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:layout_below="@+id/bar_null"
    android:layout_margin="10dp"
    android:background="#94aac1"
    zjun:showMode="ALL"
    zjun:percentTextSize="70sp"
    zjun:unitText=""
    zjun:unitTextAlignMode="CN"
    zjun:unitTextSize="20sp"
    zjun:buttonTextSize="20sp"
    zjun:buttonTopOffset="20dp"
    />

###1_3-原理分析 参考CSDN博客


回到顶部

progressbar's People

Contributors

zjun615 avatar

Watchers

 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.