Browse Source

0.0.37.beta6

kongzue 4 years ago
parent
commit
d1e2d7a4be

+ 0 - 1
DialogX/src/main/AndroidManifest.xml

@@ -1,5 +1,4 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.kongzue.dialogx">
 
-    /
 </manifest>

+ 24 - 17
DialogX/src/main/java/com/kongzue/dialogx/dialogs/BottomDialog.java

@@ -385,22 +385,29 @@ public class BottomDialog extends BaseDialog {
             boxRoot.post(new Runnable() {
                 @Override
                 public void run() {
-                    Animation enterAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_dialogx_bottom_enter);
-                    long enterAnimDurationTemp = enterAnim.getDuration();
-                    if (overrideEnterDuration >= 0) {
-                        enterAnimDurationTemp = overrideEnterDuration;
-                    }
-                    if (enterAnimDuration >= 0) {
-                        enterAnimDurationTemp = enterAnimDuration;
-                    }
-                    enterAnim.setDuration(enterAnimDurationTemp);
-                    enterAnim.setInterpolator(new DecelerateInterpolator(2f));
-                    bkg.startAnimation(enterAnim);
-                    
-                    bkg.setY(bkgEnterAimY);
+                    bkg.setY(boxRoot.getHeight());
+                    bkg.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            
+                            bkg.setY(bkgEnterAimY);
+    
+                            Animation enterAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_dialogx_bottom_enter);
+                            long enterAnimDurationTemp = enterAnim.getDuration();
+                            if (overrideEnterDuration >= 0) {
+                                enterAnimDurationTemp = overrideEnterDuration;
+                            }
+                            if (enterAnimDuration >= 0) {
+                                enterAnimDurationTemp = enterAnimDuration;
+                            }
+                            enterAnim.setDuration(enterAnimDurationTemp);
+                            enterAnim.setInterpolator(new DecelerateInterpolator(2f));
+                            bkg.startAnimation(enterAnim);
+                        }
+                    });
                     
                     boxRoot.animate()
-                            .setDuration(enterAnimDurationTemp)
+                            .setDuration(300)
                             .alpha(1f)
                             .setInterpolator(new DecelerateInterpolator())
                             .setListener(null);
@@ -537,9 +544,9 @@ public class BottomDialog extends BaseDialog {
                 if (exitAnimDuration >= 0) {
                     exitAnimDurationTemp = exitAnimDuration;
                 }
-                ObjectAnimator enterAnim = ObjectAnimator.ofFloat(bkg, "y", bkg.getY(), bkgEnterAimY);
-                enterAnim.setDuration(exitAnimDurationTemp);
-                enterAnim.start();
+                ObjectAnimator exitAnim = ObjectAnimator.ofFloat(bkg, "y", bkg.getY(), bkgEnterAimY);
+                exitAnim.setDuration(exitAnimDurationTemp);
+                exitAnim.start();
             }
         }
     }

+ 0 - 11
DialogX/src/main/res/values-v29/styles.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorAccent</item>
-        <item name="colorPrimaryDark">@color/colorAccent</item>
-        <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:forceDarkAllowed">true</item>
-    </style>
-</resources>

+ 0 - 14
DialogX/src/main/res/values/styles.xml

@@ -1,18 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorAccent</item>
-        <item name="colorPrimaryDark">@color/colorAccent</item>
-        <item name="colorAccent">@color/colorAccent</item>
-    </style>
-
-    <style name="AppThemeDark" parent="Theme.AppCompat">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorAccent</item>
-        <item name="colorPrimaryDark">@color/colorAccent</item>
-        <item name="colorAccent">@color/colorAccent</item>
-    </style>
-
 </resources>

+ 0 - 4
DialogXIOSStyle/src/main/res/values/styles.xml

@@ -1,8 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <style name="AppTheme" />
-
-    <style name="AppThemeDark" />
-
 </resources>

+ 0 - 4
DialogXKongzueStyle/src/main/res/values/styles.xml

@@ -1,8 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <style name="AppTheme" />
-
-    <style name="AppThemeDark" />
-
 </resources>

+ 0 - 4
DialogXMIUIStyle/src/main/res/values/styles.xml

@@ -1,8 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <style name="AppTheme" />
-
-    <style name="AppThemeDark" />
-
 </resources>

+ 1 - 1
README.md

@@ -1,7 +1,7 @@
 经过三代的更迭,全新的 Kongzue DialogX 已经到来,不仅仅保留了以往的优势,更带来了更灵活的扩展性和全新的流畅体验。
 
 <a href="https://github.com/kongzue/dialogX/">
-<img src="https://img.shields.io/badge/Kongzue%20Dialog-Beta-green.svg" alt="Kongzue Dialog">
+<img src="https://img.shields.io/badge/Kongzue%20DialogX-Beta-green.svg" alt="Kongzue Dialog">
 </a> 
 <a href="https://bintray.com/myzchh/maven/dialogX/">
 <img src="https://api.bintray.com/packages/myzchh/maven/dialogX/images/download.svg" alt="jCenter">

+ 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.beta5
+BUILD_VERSION=0.0.37.beta6
 BUILD_VERSION_INT=36