daimajia/NumberProgressBar
Fork: 1397 Star: 6066 (更新于 2024-10-26 17:35:31)
license: MIT
Language: Java .
A beautiful, slim Android ProgressBar.
最后发布版本: v1.2 ( 2014-08-27 08:36:14)
Android NumberProgressBar
The NumberProgressBar is a bar, slim and sexy (every man wants! ).
I decided to do this because I was really tired of android original progress bar. So, I made some change, added more color style for this.
And also you can contribute more color style, or new idea to me.
BTW. My friends also made some other platform's NumberProgressBar:
Demo
Usage
Gradle
dependencies {
compile 'com.daimajia.numberprogressbar:library:1.4@aar'
}
Maven
<dependency>
<groupId>com.daimajia.numberprogressbar</groupId>
<artifactId>library</artifactId>
<version>1.4</version>
<type>apklib</type>
</dependency>
Use it in your own code:
<com.daimajia.numberprogressbar.NumberProgressBar
android:id="@+id/number_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
```
I made some predesign style. You can use them via `style` property.
![Preset color](http://ww1.sinaimg.cn/mw690/610dc034jw1efyslmn5itj20f30k074r.jpg)
Use the preset style just like below:
```java
<com.daimajia.numberprogressbar.NumberProgressBar
android:id="@+id/number_progress_bar"
style="@style/NumberProgressBar_Default"
/>
```
In the above picture, the style is :
`NumberProgressBar_Default`
`NumberProgressBar_Passing_Green`
`NumberProgressBar_Relax_Blue`
`NumberProgressBar_Grace_Yellow`
`NumberProgressBar_Warning_Red`
`NumberProgressBar_Funny_Orange`
`NumberProgressBar_Beauty_Red`
`NumberProgressBar_Twinkle_Night`
You can get more beautiful color from [kular](https://kuler.adobe.com), and you can also contribute your color style to NumberProgressBar!
### Build
run `./gradlew assembleDebug` (Mac/Linux)
or
run `gradlew.bat assembleDebug` (Windows)
### Attributes
There are several attributes you can set:
![](http://ww2.sinaimg.cn/mw690/610dc034jw1efyttukr1zj20eg04bmx9.jpg)
The **reached area** and **unreached area**:
* color
* height
The **text area**:
* color
* text size
* visibility
* distance between **reached area** and **unreached area**
The **bar**:
* max progress
* current progress
for example, the default style:
```java
<com.daimajia.numberprogressbar.NumberProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
custom:progress_unreached_color="#CCCCCC"
custom:progress_reached_color="#3498DB"
custom:progress_unreached_bar_height="0.75dp"
custom:progress_reached_bar_height="1.5dp"
custom:progress_text_size="10sp"
custom:progress_text_color="#3498DB"
custom:progress_text_offset="1dp"
custom:progress_text_visibility="visible"
custom:progress_max="100"
custom:progress_current="80"
/>
About me:
A student in China mainland, I like Google, like Android, like open source, like doing something interesting. :)
If you have some new idea or internship opportunity, please email me !
最近版本更新:(数据更新于 2024-10-28 12:54:53)
2014-08-27 08:36:14 v1.2
2014-05-09 23:58:59 v1.1
2014-05-01 16:59:11 v1.0
主题(topics):
android, numberprogressbar, prgressbar
daimajia/NumberProgressBar同语言 Java最近更新仓库
2024-11-12 09:59:10 mybatis-flex/mybatis-flex
2024-11-11 23:58:45 PBH-BTN/PeerBanHelper
2024-11-10 07:12:10 Stirling-Tools/Stirling-PDF
2024-11-08 23:15:38 yuliskov/SmartTube
2024-11-08 15:41:22 Tornaco/Thanox
2024-11-08 05:44:55 jmdns/jmdns