diff --git a/README.md b/README.md index cb7a7c8..7fb1453 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Image](app/src/main/ic_launcher-web.png) [![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/AppUpdater/master/app/release/app-release.apk) -[![JCenter](https://img.shields.io/badge/JCenter-1.0.8-46C018.svg)](https://bintray.com/beta/#/jenly/maven/app-updater) +[![JCenter](https://img.shields.io/badge/JCenter-1.0.9-46C018.svg)](https://bintray.com/beta/#/jenly/maven/app-updater) [![JitPack](https://jitpack.io/v/jenly1314/AppUpdater.svg)](https://jitpack.io/#jenly1314/AppUpdater) [![CI](https://travis-ci.org/jenly1314/AppUpdater.svg?branch=master)](https://travis-ci.org/jenly1314/AppUpdater) [![CircleCI](https://circleci.com/gh/jenly1314/AppUpdater.svg?style=svg)](https://circleci.com/gh/jenly1314/AppUpdater) @@ -44,7 +44,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 com.king.app app-updater - 1.0.8 + 1.0.9 pom @@ -52,7 +52,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 com.king.app app-dialog - 1.0.8 + 1.0.9 pom ``` @@ -61,25 +61,25 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 //----------AndroidX 版本 //app-updater - implementation 'com.king.app:app-updater:1.0.8-androidx' + implementation 'com.king.app:app-updater:1.0.9-androidx' //app-dialog - implementation 'com.king.app:app-dialog:1.0.8-androidx' + implementation 'com.king.app:app-dialog:1.0.9-androidx' //----------Android Support 版本 //app-updater - implementation 'com.king.app:app-updater:1.0.8' + implementation 'com.king.app:app-updater:1.0.9' //app-dialog - implementation 'com.king.app:app-dialog:1.0.8' + implementation 'com.king.app:app-dialog:1.0.9' ``` ### Lvy: ```lvy //app-updater - + //app-dialog - + ``` @@ -131,7 +131,7 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 .serUrl(mUrl) .setFilename("AppUpdater.apk") .build(getContext()) - .setHttpManager(OkHttpManager.getInstance())//使用OkHttpClient实现下载,需依赖okhttp库 + .setHttpManager(OkHttpManager.getInstance())//不设置HttpManager时,默认使用HttpsURLConnection下载,如果使用OkHttpClient实现下载,需依赖okhttp库 .start(); AppDialog.INSTANCE.dismissDialogFragment(getSupportFragmentManager()); } @@ -142,8 +142,17 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jenly1314.github.io/projects/AppUpdater/doc/) +## 混淆 + +**app-updater** [Proguard rules](blob/master/app-updater/proguard-rules.pro) + +**app-dialog** [Proguard rules](blob/master/app-dialog/proguard-rules.pro) + ## 版本记录 +#### v1.0.9:2020-12-11 +* 优化默认Dialog样式的显示细节 + #### v1.0.8:2020-1-2 * 支持MD5校验 * 对外提供获取Dialog方法 @@ -192,12 +201,15 @@ AppUpdater for Android 是一个专注于App更新,一键傻瓜式集成App版 CSDN: jenly121 - CNBlog: jenly + CNBlogs: jenly + + GitHub: jenly1314 - Github: jenly1314 + Gitee: jenly1314 加入QQ群: 20867961
+ diff --git a/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java b/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java index 2dba6e5..7e78ba4 100644 --- a/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java +++ b/app-dialog/src/main/java/com/king/app/dialog/AppDialog.java @@ -52,14 +52,10 @@ public enum AppDialog { btnDialogCancel.setOnClickListener(config.getOnClickCancel() != null ? config.getOnClickCancel() : mOnClickDismissDialog); btnDialogCancel.setVisibility(config.isHideCancel() ? View.GONE : View.VISIBLE); - try{ - //不强制要求要有中间的线 - View line = view.findViewById(R.id.line); - if(line != null){ - line.setVisibility(config.isHideCancel() ? View.GONE : View.VISIBLE); - } - }catch (Exception e){ - + //不强制要求要有中间的线 + View line = view.findViewById(config.getLineId()); + if(line != null){ + line.setVisibility(config.isHideCancel() ? View.GONE : View.VISIBLE); } Button btnDialogOK = view.findViewById(config.getOkId()); diff --git a/app-dialog/src/main/java/com/king/app/dialog/AppDialogConfig.java b/app-dialog/src/main/java/com/king/app/dialog/AppDialogConfig.java index 485037f..f754d7c 100644 --- a/app-dialog/src/main/java/com/king/app/dialog/AppDialogConfig.java +++ b/app-dialog/src/main/java/com/king/app/dialog/AppDialogConfig.java @@ -35,7 +35,7 @@ public class AppDialogConfig { /** * 按钮中间分割线ID */ - private @IdRes int line = R.id.line; + private @IdRes int lineId = R.id.line; /** * 标题文本 */ @@ -112,12 +112,12 @@ public class AppDialogConfig { return this; } - public @IdRes int getLine() { - return line; + public @IdRes int getLineId() { + return lineId; } - public AppDialogConfig setLine(@IdRes int line) { - this.line = line; + public AppDialogConfig setLineId(@IdRes int lineId) { + this.lineId = lineId; return this; } diff --git a/app-dialog/src/main/java/com/king/app/dialog/fragment/AppDialogFragment.java b/app-dialog/src/main/java/com/king/app/dialog/fragment/AppDialogFragment.java index 9f089dc..ebf2ded 100644 --- a/app-dialog/src/main/java/com/king/app/dialog/fragment/AppDialogFragment.java +++ b/app-dialog/src/main/java/com/king/app/dialog/fragment/AppDialogFragment.java @@ -46,12 +46,10 @@ public class AppDialogFragment extends BaseDialogFragment { btnDialogCancel.setOnClickListener(config.getOnClickCancel() != null ? config.getOnClickCancel() : getOnClickDismiss()); btnDialogCancel.setVisibility(config.isHideCancel() ? View.GONE : View.VISIBLE); - try{ - //不强制要求要有中间的线 - View line = rootView.findViewById(R.id.line); + //不强制要求要有中间的线 + View line = rootView.findViewById(config.getLineId()); + if(line != null){ line.setVisibility(config.isHideCancel() ? View.GONE : View.VISIBLE); - }catch (Exception e){ - } Button btnDialogOK = rootView.findViewById(config.getOkId()); diff --git a/app-dialog/src/main/res/layout/app_dialog.xml b/app-dialog/src/main/res/layout/app_dialog.xml index 80f1634..fbb9c61 100644 --- a/app-dialog/src/main/res/layout/app_dialog.xml +++ b/app-dialog/src/main/res/layout/app_dialog.xml @@ -11,8 +11,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" - android:minHeight="40dp" - android:padding="6dp" + android:padding="10dp" android:lines="1" android:textSize="@dimen/app_dialog_title_text_size" android:textColor="@color/app_dialog_title_color" @@ -24,9 +23,8 @@ android:padding="10dp" android:textSize="@dimen/app_dialog_content_text_size" android:textColor="@color/app_dialog_content_color" - android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - android:lineSpacingMultiplier="1" /> + android:lineSpacingMultiplier="1.2" /> #333333 @color/colorAccent - #d2d2d2 + #f2f2f2 diff --git a/app-dialog/src/main/res/values/dimens.xml b/app-dialog/src/main/res/values/dimens.xml index 90f2a0a..58e8f50 100644 --- a/app-dialog/src/main/res/values/dimens.xml +++ b/app-dialog/src/main/res/values/dimens.xml @@ -6,5 +6,5 @@ 16sp 16sp - 18sp + 16sp \ No newline at end of file diff --git a/app/release/app-release.apk b/app/release/app-release.apk index 8d34c65..57643d2 100644 Binary files a/app/release/app-release.apk and b/app/release/app-release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 11541d8..1e7126e 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":13,"versionName":"1.0.8","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":15,"versionName":"1.0.9","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/king/appupdater/MainActivity.java b/app/src/main/java/com/king/appupdater/MainActivity.java index f470916..b9473d1 100644 --- a/app/src/main/java/com/king/appupdater/MainActivity.java +++ b/app/src/main/java/com/king/appupdater/MainActivity.java @@ -3,6 +3,7 @@ package com.king.appupdater; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; +import android.os.Environment; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; diff --git a/app/src/main/res/layout/dialog.xml b/app/src/main/res/layout/dialog.xml index 6d97aba..c5f8f24 100644 --- a/app/src/main/res/layout/dialog.xml +++ b/app/src/main/res/layout/dialog.xml @@ -11,8 +11,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" - android:minHeight="40dp" - android:padding="6dp" + android:padding="10dp" android:lines="1" android:textSize="16sp" android:background="@drawable/dialog_title_bg" @@ -22,8 +21,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp" - android:layout_marginBottom="6dp" - android:lineSpacingMultiplier="1" /> + android:textSize="@dimen/app_dialog_content_text_size" + android:textColor="@color/app_dialog_content_color" + android:layout_marginBottom="16dp" + android:lineSpacingMultiplier="1.2" />