Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> RingProgressBar

RingProgressBar

編輯:關於Android編程

項目地址:RingProgressBar\
簡介:一個簡單實現的自定義圓環進度條,可使用於文件的上傳下載圖片加載等地方.

A material design circle the progress bar,You can download it in image loading and file upload when used.

Screenshots

\

\\

Import

 Step 1. Add the JitPack repository to your build file
 Add it in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }



Step 2. Add the dependency

    dependencies {
             compile 'com.github.HotBitmapGG:RingProgressBar:V1.2.1'
    }

Directions

custom properties name format instructions ringColor color Color ring ringProgressColor color Progress of color ringWidth dimension Ring width of progress textColor color Text color textSize dimension Text size max integer Max progress textIsShow boolean Is display text style STROKE& FILL Circle progress style

Usage

1.In the XML
    



    
2.In the code
  mRingProgressBar = (RingProgressBar) findViewById(R.id.progress_bar);

  // Set the progress bar's progress
  mRingProgressBar.setProgress(progress);
  mRingProgressBar.setOnProgressListener(new RingProgressBar.OnProgressListener()
  {

    @Override
     public void progressToComplete()
     {
         // Progress reaches the maximum callback default Max value is 100
         Toast.makeText(MainActivity.this, "complete", Toast.LENGTH_SHORT).show();
     }
  });

Tips

Increased after the completion of a tick to show animation effects, but don't know this have any practical application, so the code commented out, students in need can use open comments.

Other

  • 知了日報客戶端:https://github.com/HotBitmapGG/RxZhiHu

  • 高仿 BiliBili 客戶端:https://github.com/HotBitmapGG/OhMyBiliBili

  • Gank.io 客戶端:https://github.com/HotBitmapGG/StudyProject

  • 妹子福利 App:https://github.com/HotBitmapGG/MoeQuest

  • 圓環進度條:https://github.com/HotBitmapGG/RingProgressBar

  • 仿芝麻信用分儀表盤:https://github.com/HotBitmapGG/CreditSesameRingView
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved