kongzue 4 лет назад
Родитель
Сommit
9223a0441d

+ 1 - 1
DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java

@@ -174,7 +174,7 @@ public abstract class BaseDialog {
     
     protected void showText(TextView textView, CharSequence text) {
         if (textView == null) return;
-        if (text == null) {
+        if (isNull(text)) {
             textView.setVisibility(View.GONE);
             textView.setText("");
         } else {

+ 6 - 0
DialogX/src/main/java/com/kongzue/dialogx/util/views/MaxRelativeLayout.java

@@ -25,6 +25,8 @@ public class MaxRelativeLayout extends RelativeLayout {
     
     private int maxWidth;
     private int maxHeight;
+    private int minWidth;
+    private int minHeight;
     private boolean lockWidth;
     private boolean interceptTouch = true;
     
@@ -55,6 +57,8 @@ public class MaxRelativeLayout extends RelativeLayout {
             
             a.recycle();
         }
+        minWidth = getMinimumWidth();
+        minHeight = getMinimumHeight();
         
         if (!isInEditMode()) {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
@@ -110,6 +114,8 @@ public class MaxRelativeLayout extends RelativeLayout {
         if (contentView != null) {
             int widthTemp = contentView.getMeasuredWidth() == 0 ? getMeasuredWidth() : contentView.getMeasuredWidth();
             int heightTemp = contentView.getMeasuredHeight() == 0 ? getMeasuredHeight() : contentView.getMeasuredHeight();
+            if (widthTemp < minWidth) widthTemp = minWidth;
+            if (heightTemp < minHeight) heightTemp = minHeight;
             if (blurView != null) {
                 LayoutParams lp = (LayoutParams) blurView.getLayoutParams();
                 lp.width = widthTemp;

+ 1 - 1
gradle.properties

@@ -18,5 +18,5 @@ android.useAndroidX=true
 # Automatically convert third-party libraries to use AndroidX
 android.enableJetifier=true
 
-BUILD_VERSION=0.0.37.beta9
+BUILD_VERSION=0.0.37.beta10
 BUILD_VERSION_INT=36