Skip to content

Commit f00c217

Browse files
committed
1、修改library默认TitleBarView高度配置
2、修改快速观察者回调控制
1 parent 457275e commit f00c217

File tree

6 files changed

+28
-14
lines changed

6 files changed

+28
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ allprojects {
3333

3434
```
3535
dependencies {
36-
    //compile 'com.github.AriesHoo:FastLib:2.0.2'
36+
    //compile 'com.github.AriesHoo:FastLib:2.0.3'
3737
compile 'com.github.AriesHoo:FastLib:${LATEST_VERSION}'
3838
}
3939
```

app/build.gradle

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ apply plugin: 'com.android.application'
22
apply plugin: 'com.neenbedankt.android-apt'
33
apply plugin: 'me.tatarka.retrolambda'
44

5+
def releaseTime() {
6+
return new Date().format("yyyy-mm-dd_hh-mm", TimeZone.getTimeZone("GMT+8"))
7+
}
8+
59
android {
610
def ext = rootProject.ext
711
compileSdkVersion ext.compileSdkVersion
@@ -10,8 +14,8 @@ android {
1014
applicationId "com.aries.library.fast.demo"
1115
minSdkVersion ext.minSdkVersion
1216
targetSdkVersion ext.targetSdkVersion
13-
versionCode 202
14-
versionName "2.0.2"
17+
versionCode 203
18+
versionName "2.0.3"
1519
multiDexEnabled true
1620
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1721
buildConfigField "String", "BASE_URL", "\"https://api.douban.com/\""
@@ -37,6 +41,17 @@ android {
3741
minifyEnabled false
3842
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3943
signingConfig signingConfigs.release
44+
applicationVariants.all { variant ->
45+
variant.outputs.each { output ->
46+
def outputFile = output.outputFile
47+
if (outputFile != null && outputFile.name.endsWith('.apk')) {
48+
if (variant.buildType.name.equals('release')) {
49+
def fileName = "FastLib_v${defaultConfig.versionName}_${releaseTime()}.apk"
50+
output.outputFile = new File(outputFile.parent, fileName)
51+
}
52+
}
53+
}
54+
}
4055
}
4156
}
4257

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
defaultConfig {
99
minSdkVersion 15
1010
targetSdkVersion 25
11-
versionCode 202
12-
versionName "2.0.2"
11+
versionCode 203
12+
versionName "2.0.3"
1313
}
1414
buildTypes {
1515
release {

library/src/main/java/com/aries/library/fast/retrofit/FastLoadingObserver.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ public FastLoadingObserver(FastLoadDialog dialog) {
1818
}
1919

2020
@Override
21-
public void onComplete() {
21+
public void onNext(T entity) {
2222
dismissProgressDialog();
23-
super.onComplete();
23+
super.onNext(entity);
2424
}
2525

26+
@Override
27+
public void onError(Throwable e) {
28+
dismissProgressDialog();
29+
super.onError(e);
30+
}
2631

2732
protected void showProgressDialog() {
2833
if (dialog != null) {

library/src/main/java/com/aries/library/fast/retrofit/FastObserver.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@
2727
*/
2828
public abstract class FastObserver<T> extends DefaultObserver<T> {
2929

30-
@Override
31-
public void onComplete() {
32-
}
33-
3430
@Override
3531
public void onError(Throwable e) {
36-
onComplete();
3732
int reason = R.string.fast_exception_other_error;
3833
int code = FastError.EXCEPTION_OTHER_ERROR;
3934
Activity current = FastStackUtil.getInstance().getCurrent();
@@ -77,7 +72,6 @@ public void onError(Throwable e) {
7772

7873
@Override
7974
public void onNext(T entity) {
80-
onComplete();
8175
_onNext(entity);
8276
}
8377

library/src/main/res/values/dimens.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<!--TitleBarView 高度-->
4-
<dimen name="dp_title_height">?actionBarSize</dimen>
4+
<dimen name="dp_title_height">48dp</dimen>
55

66
<!--主页tab高度-->
77
<dimen name="dp_tab_height">56dp</dimen>

0 commit comments

Comments
 (0)