Skip to content

Commit 36c2efc

Browse files
committed
first commit
1 parent c1840c7 commit 36c2efc

File tree

38 files changed

+919
-1
lines changed

38 files changed

+919
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ out/
1616
# Gradle files
1717
.gradle/
1818
build/
19+
.idea
1920

2021
# Local configuration file (sdk path, etc)
2122
local.properties
@@ -38,3 +39,5 @@ captures/
3839

3940
# Keystore files
4041
*.jks
42+
43+

.gitignore.bak

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the ART/Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
out/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
# Android Studio Navigation editor temp files
30+
.navigation/
31+
32+
# Android Studio captures folder
33+
captures/
34+
35+
# Intellij
36+
*.iml
37+
.idea/workspace.xml
38+
39+
# Keystore files
40+
*.jks

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
11
# SmoothRoundProgressbar
2-
圆环进度条,首尾交接处圆润,自带动画,可自定义渐变,环厚度,转动速度
2+
# 效果图
3+
4+
![demo](demo.gif)
5+
6+
# 使用
7+
8+
需要指定确定的layout_width和layout_height,两者应该一致.圆环贴着view边缘往内画,不要设置padding,以免变形以及改变了显示效果。
9+
10+
默认结束颜色为浅灰色,开始颜色为白色。
11+
具体项目中,一般改endcolor为需要的颜色即可。
12+
13+
cpb_duration : 默认1200ms转完一圈。此速度适中,一般无需更改。
14+
cpb_strokeWidth : 为圆直径的0.08倍,参考安卓原生比例,一般无需更改。
15+
cpb_startColor:默认白色,一般无需更改。
16+
cpb_endColor :浅灰色,能应付大多数场景。如果对颜色有要求,改此属性即可。
17+
18+
<com.hss01248.roundprogressbar.RoundProgressBar
19+
android:id="@+id/pb"
20+
android:layout_centerInParent="true"
21+
app:cpb_duration = "1200"
22+
android:layout_width="200dp"
23+
android:layout_height="200dp" />
24+
25+
26+
# blog
27+
28+
[自定义圆形进度条](http://blog.csdn.net/hss01248/article/details/52089756)

app/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build
2+
*.log

app/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.3"
6+
7+
defaultConfig {
8+
applicationId "com.hss01248.progressbarcircle"
9+
minSdkVersion 15
10+
targetSdkVersion 23
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
testCompile 'junit:junit:4.12'
25+
compile 'com.android.support:appcompat-v7:23.0.1'
26+
compile project(path: ':roundprogressbar')
27+
}

app/proguard-rules.pro

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in D:\development\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.hss01248.progressbarcircle;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

app/src/main/AndroidManifest.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.hss01248.progressbarcircle">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity android:name=".MainActivity">
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
15+
<category android:name="android.intent.category.LAUNCHER" />
16+
</intent-filter>
17+
</activity>
18+
</application>
19+
20+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.hss01248.progressbarcircle;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
6+
public class MainActivity extends Activity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.activity_main);
12+
// SmoothRoundProgressBar progressBar = (SmoothRoundProgressBar)findViewById(R.id.pb);
13+
}
14+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:gravity="center_horizontal"
7+
android:orientation="vertical"
8+
xmlns:app="http://schemas.android.com/apk/res-auto"
9+
tools:context="com.hss01248.progressbarcircle.MainActivity">
10+
<com.hss01248.roundprogressbar.SmoothRoundProgressBar
11+
android:layout_marginTop="10dp"
12+
android:layout_width="40dp"
13+
android:layout_height="40dp" />
14+
<com.hss01248.roundprogressbar.SmoothRoundProgressBar
15+
android:layout_marginTop="10dp"
16+
app:cpb_endColor = "@android:color/holo_blue_dark"
17+
android:layout_width="40dp"
18+
android:layout_height="40dp" />
19+
<com.hss01248.roundprogressbar.SmoothRoundProgressBar
20+
android:layout_marginTop="10dp"
21+
app:cpb_startColor = "@android:color/holo_green_light"
22+
app:cpb_endColor = "@android:color/holo_blue_dark"
23+
android:layout_width="80dp"
24+
android:layout_height="80dp" />
25+
26+
<com.hss01248.roundprogressbar.SmoothRoundProgressBar
27+
android:layout_marginTop="10dp"
28+
app:cpb_startColor = "@android:color/holo_green_light"
29+
app:cpb_endColor = "@android:color/holo_blue_dark"
30+
app:cpb_duration = "3000"
31+
android:layout_width="80dp"
32+
android:layout_height="80dp" />
33+
34+
<com.hss01248.roundprogressbar.SmoothRoundProgressBar
35+
android:layout_marginTop="10dp"
36+
app:cpb_startColor = "@android:color/holo_green_light"
37+
app:cpb_endColor = "@android:color/holo_blue_dark"
38+
app:cpb_duration = "3000"
39+
app:cpb_strokeWidth = "15dp"
40+
android:layout_width="80dp"
41+
android:layout_height="80dp" />
42+
43+
</LinearLayout>

0 commit comments

Comments
 (0)