Skip to content

Commit

Permalink
Merge pull request #105 from qiujuer/develop-caprice
Browse files Browse the repository at this point in the history
Develop caprice
  • Loading branch information
qiujuer authored Jul 14, 2018
2 parents ea48144 + c33abd9 commit f64da05
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 54 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Genius--Android-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1463)
![License](https://img.shields.io/github/license/qiujuer/Genius-Android.svg)
![License](https://img.shields.io/github/stars/qiujuer/Genius-Android.svg)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Genius--Android-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1463)
[![Download](https://api.bintray.com/packages/qiujuer/maven/net.qiujuer.genius%3Aui/images/download.svg)](https://bintray.com/qiujuer/maven/net.qiujuer.genius%3Aui/_latestVersion)


[`GitHub`](https://github.com/qiujuer/Genius-Android) [`OSChina`](http://git.oschina.net/qiujuer/Genius-Android) [`中文`](README-ZH.md) [`English`](README.md)

Expand Down Expand Up @@ -38,18 +42,18 @@
```groovy
dependencies {
// ui module
api 'net.qiujuer.genius:ui:2.0.1'
api 'net.qiujuer.genius:res:2.0.1'
api 'net.qiujuer.genius:ui:2.1.0'
api 'net.qiujuer.genius:res:2.1.0'
// use to bitmap blur and more
api 'net.qiujuer.genius:graphics:2.0.1'
api 'net.qiujuer.genius:graphics:2.1.0'
// ping/telnet/tracert/dns and run cmd
api 'net.qiujuer.genius:kit-cmd:2.0.1'
api 'net.qiujuer.genius:kit-cmd:2.1.0'
// shuttle between ui-thread and child-thread
api 'net.qiujuer.genius:kit-handler:2.0.1'
api 'net.qiujuer.genius:kit-handler:2.1.0'
// calss reflect
api 'net.qiujuer.genius:kit-reflect:2.0.1'
api 'net.qiujuer.genius:kit-reflect:2.1.0'
}
```

Expand Down
33 changes: 16 additions & 17 deletions caprice/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion ANDROID_BUILD_SDK_VERSION as int
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

defaultConfig {
applicationId "net.qiujuer.sample.genius"
Expand All @@ -21,25 +20,25 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
testImplementation 'junit:junit:4.12'
api fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:25.3.1'
api 'com.android.support:appcompat-v7:27.1.1'

//compile project(':ui')
//compile project(':res')
//compile project(':graphics')
//compile project(':kit-cmd')
//compile project(':kit-reflect')
//compile project(':kit-handler')
//api project(':ui')
//api project(':res')
//api project(':graphics')
//api project(':kit-cmd')
//api project(':kit-reflect')
//api project(':kit-handler')

compile 'net.qiujuer.genius:ui:2.0.1'
compile 'net.qiujuer.genius:res:2.0.1'
compile 'net.qiujuer.genius:graphics:2.0.1'
compile 'net.qiujuer.genius:kit-cmd:2.0.1'
compile 'net.qiujuer.genius:kit-reflect:2.0.1'
compile 'net.qiujuer.genius:kit-handler:2.0.1'
api 'net.qiujuer.genius:ui:2.0.1'
api 'net.qiujuer.genius:res:2.0.1'
api 'net.qiujuer.genius:graphics:2.0.1'
api 'net.qiujuer.genius:kit-cmd:2.0.1'
api 'net.qiujuer.genius:kit-reflect:2.0.1'
api 'net.qiujuer.genius:kit-handler:2.0.1'
}
8 changes: 5 additions & 3 deletions caprice/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
classpath 'com.android.tools.build:gradle:3.1.3'
}
}

plugins {
id "com.jfrog.bintray" version "1.7.3"
id "com.github.dcendents.android-maven" version "1.5"
id "com.jfrog.bintray" version "1.8.4"
id "com.github.dcendents.android-maven" version "2.1"
}

allprojects {
Expand All @@ -19,6 +20,7 @@ allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
}

Expand Down
8 changes: 4 additions & 4 deletions caprice/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=2.0.1
VERSION_NAME=2.1.0
POM_GROUP_ID=net.qiujuer.genius
POM_DESCRIPTION=Genius Lib For Android
POM_URL=https://github.com/qiujuer/Genius-Android
Expand All @@ -23,6 +23,6 @@ POM_GIT_URL=https://github.com/qiujuer/Genius-Android.git
POM_LICENCE_ALL=["Apache-2.0"]

ANDROID_BUILD_MIN_SDK_VERSION=15
ANDROID_BUILD_TARGET_SDK_VERSION=25
ANDROID_BUILD_TOOLS_VERSION=25.0.2
ANDROID_BUILD_SDK_VERSION=25
ANDROID_BUILD_TARGET_SDK_VERSION=27
ANDROID_BUILD_TOOLS_VERSION=27.0.3
ANDROID_BUILD_SDK_VERSION=27
4 changes: 2 additions & 2 deletions caprice/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 08 10:08:26 CST 2017
#Sat Jul 14 17:12:29 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
2 changes: 1 addition & 1 deletion caprice/graphics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
2 changes: 1 addition & 1 deletion caprice/kit-cmd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
2 changes: 1 addition & 1 deletion caprice/kit-handler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
2 changes: 1 addition & 1 deletion caprice/kit-reflect/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
2 changes: 1 addition & 1 deletion caprice/res/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
2 changes: 1 addition & 1 deletion caprice/ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
}

dependencies {
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
}

apply from: '../script/gradle-jcenter-push.gradle'
24 changes: 9 additions & 15 deletions caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/Loading.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,15 @@ public void setProgressStyle(int style) {
} else if (style == STYLE_LINE) {
drawable = new LoadingLineDrawable();
}
setLoadingDrawable(drawable);
}

/**
* In this we set LoadingDrawable really
*
* @param drawable {@link LoadingDrawable}
*/
protected void setLoadingDrawable(LoadingDrawable drawable) {
if (drawable == null) {
throw new NullPointerException("LoadingDrawable is null, You can only set the STYLE_CIRCLE and STYLE_LINE parameters.");
} else {
Expand Down Expand Up @@ -377,21 +386,6 @@ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
final int paddingTop = getPaddingTop();
final int paddingRight = getPaddingRight();
final int paddingBottom = getPaddingBottom();

/*
int curW = w - paddingLeft - paddingRight;
int curH = h - paddingTop - paddingBottom;
if (curW == curH) {
mLoadingDrawable.setBounds(paddingLeft, paddingTop, curW + paddingLeft, curH + paddingTop);
} else if (curW > curH) {
final int left = paddingLeft + ((curW - curH) >> 1);
mLoadingDrawable.setBounds(left, paddingTop, curH + left, curH + paddingTop);
} else if (curW < curH) {
final int top = paddingTop + ((curH - curW) >> 1);
mLoadingDrawable.setBounds(paddingLeft, top, curW + paddingLeft, curW + top);
}
*/
mLoadingDrawable.setBounds(paddingLeft, paddingTop, w - paddingRight, h - paddingBottom);
}

Expand Down

0 comments on commit f64da05

Please sign in to comment.