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 b3daf94..9b5e8ca 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
@@ -53,14 +53,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 d1c88e2..af6ccbc 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
@@ -36,7 +36,7 @@ public class AppDialogConfig {
/**
* 按钮中间分割线ID
*/
- private @IdRes int line = R.id.line;
+ private @IdRes int lineId = R.id.line;
/**
* 标题文本
*/
@@ -113,12 +113,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 1333505..cf0a6e7 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 c7ce66b..7244924 100644
--- a/app/release/output.json
+++ b/app/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":14,"versionName":"1.0.8-androidx","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":16,"versionName":"1.0.9-androidx","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/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" />