Browse Source

0.0.43.beta8

kongzue 3 years ago
parent
commit
80bc014602

+ 28 - 0
.idea/deploymentTargetDropDown.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="deploymentTargetDropDown">
+    <runningDeviceTargetSelectedWithDropDown>
+      <Target>
+        <type value="RUNNING_DEVICE_TARGET" />
+        <deviceKey>
+          <Key>
+            <type value="VIRTUAL_DEVICE_PATH" />
+            <value value="D:\SDK\Android\.android\.android\avd\Pixel_2_API_19.avd" />
+          </Key>
+        </deviceKey>
+      </Target>
+    </runningDeviceTargetSelectedWithDropDown>
+    <targetSelectedWithDropDown>
+      <Target>
+        <type value="QUICK_BOOT_TARGET" />
+        <deviceKey>
+          <Key>
+            <type value="VIRTUAL_DEVICE_PATH" />
+            <value value="D:\SDK\Android\.android\.android\avd\Pixel_2_API_19.avd" />
+          </Key>
+        </deviceKey>
+      </Target>
+    </targetSelectedWithDropDown>
+    <timeTargetWasSelectedWithDropDown value="2021-09-05T07:43:15.347201500Z" />
+  </component>
+</project>

+ 28 - 0
.idea/misc.xml

@@ -3,6 +3,12 @@
   <component name="DesignSurface">
     <option name="filePathToZoomLevelMap">
       <map>
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable-v21/button_dialogx_material_light.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable-v21/button_dialogx_material_night.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable/button_dialogx_material_light.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable/button_dialogx_material_night.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable/rect_dialogx_low_api_material_button_press.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable/rect_dialogx_low_api_material_button_press_dark.xml" value="0.3484375" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/drawable/rect_dialogx_material_bkg_light.xml" value="0.4787037037037037" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/layout/item_dialogx_material_bottom_menu_normal_text.xml" value="0.5328205128205128" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/layout/item_dialogx_material_context_menu_normal_text.xml" value="0.5411458333333333" />
@@ -15,12 +21,32 @@
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/layout/layout_dialogx_popmenu_material_dark.xml" value="0.5411458333333333" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/layout/layout_dialogx_poptip_material.xml" value="0.4101851851851852" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogX/src/main/res/layout/layout_dialogx_poptip_material_dark.xml" value="0.4101851851851852" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXIOSStyle/src/main/res/drawable/button_dialogx_ios_left_light.xml" value="0.3484375" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXIOSStyle/src/main/res/layout/item_dialogx_ios_bottom_menu_top_dark.xml" value="0.33229166666666665" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/button_dialogx_miui_blue.xml" value="0.5487179487179488" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/button_dialogx_miui_center_light.xml" value="0.5487179487179488" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/button_dialogx_miui_center_night.xml" value="0.5487179487179488" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/editbox_dialogx_miui_light.xml" value="0.47129629629629627" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_gray_normal_night.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_gray_press.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_gray_press_night.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_top_gray_press.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_top_gray_press_night.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_button_top_light.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_editbox_focus.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_editbox_focus_night.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_editbox_normal.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/rect_dialogx_miui_editbox_normal_night.xml" value="0.5572916666666666" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/scrollbar_dialogx_vertical.xml" value="0.5487179487179488" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/drawable/scrollbar_dialogx_vertical_dark.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_bottom_dark.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_bottom_light.xml" value="0.5411458333333333" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_center_dark.xml" value="0.5212962962962963" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_center_light.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_top_dark.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/item_dialogx_miui_bottom_menu_top_light.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/layout_dialogx_miui.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/DialogXMIUIStyle/src/main/res/layout/layout_dialogx_miui_dark.xml" value="0.5411458333333333" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/drawable/ios_edit_box_bkg.xml" value="0.425" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/drawable/rect_ios_edit_box_bkg_focus.xml" value="0.425" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/layout/activity_app_compat_test.xml" value="0.5328205128205128" />
@@ -36,6 +62,8 @@
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/layout/layout_custom_view.xml" value="0.5328205128205128" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/layout/layout_full_login.xml" value="0.3824074074074074" />
         <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/layout/layout_full_webview.xml" value="0.5411458333333333" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.5572916666666666" />
+        <entry key="..\:/WorkSpace/Android/DialogXDemo/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.5572916666666666" />
       </map>
     </option>
   </component>

+ 1 - 1
DialogX/build.gradle

@@ -7,7 +7,7 @@ android {
     compileSdkVersion 30
 
     defaultConfig {
-        minSdkVersion 21
+        minSdkVersion 19
         targetSdkVersion 30
 
         consumerProguardFiles "consumer-rules.pro"

+ 4 - 1
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopMenu.java

@@ -4,6 +4,7 @@ import static android.view.View.OVER_SCROLL_NEVER;
 
 import android.animation.ValueAnimator;
 import android.content.res.Configuration;
+import android.os.Build;
 import android.os.Handler;
 import android.os.Looper;
 import android.text.TextUtils;
@@ -389,7 +390,9 @@ public class PopMenu extends BaseDialog {
                         rLp.leftMargin = dip2px(50);
                         rLp.rightMargin = dip2px(50);
                         boxBody.setAlpha(0f);
-                        boxBody.setElevation(dip2px(20));
+                        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                            boxBody.setElevation(dip2px(20));
+                        }
                         boxBody.setVisibility(View.VISIBLE);
                         boxBody.animate().alpha(1f).setDuration(enterAnimDurationTemp);
                         

+ 7 - 4
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopTip.java

@@ -4,6 +4,7 @@ import android.animation.Animator;
 import android.app.Activity;
 import android.content.res.Configuration;
 import android.graphics.Rect;
+import android.os.Build;
 import android.os.Handler;
 import android.os.Looper;
 import android.view.View;
@@ -551,10 +552,12 @@ public class PopTip extends BaseDialog {
             if (iconResId != 0) {
                 imgDialogxPopIcon.setVisibility(View.VISIBLE);
                 imgDialogxPopIcon.setImageResource(iconResId);
-                if (autoTintIconInLightOrDarkMode) {
-                    imgDialogxPopIcon.setImageTintList(txtDialogxPopText.getTextColors());
-                } else {
-                    imgDialogxPopIcon.setImageTintList(null);
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                    if (autoTintIconInLightOrDarkMode) {
+                        imgDialogxPopIcon.setImageTintList(txtDialogxPopText.getTextColors());
+                    } else {
+                        imgDialogxPopIcon.setImageTintList(null);
+                    }
                 }
             } else {
                 imgDialogxPopIcon.setVisibility(View.GONE);

+ 12 - 8
DialogX/src/main/java/com/kongzue/dialogx/util/BottomMenuArrayAdapter.java

@@ -6,6 +6,7 @@ import android.content.Context;
 import android.content.res.ColorStateList;
 import android.graphics.Typeface;
 import android.graphics.drawable.StateListDrawable;
+import android.os.Build;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.LayoutInflater;
@@ -158,11 +159,13 @@ public class BottomMenuArrayAdapter extends BaseAdapter {
             if (DialogX.menuTextInfo != null) {
                 useTextInfo(viewHolder.txtDialogxMenuText, DialogX.menuTextInfo);
             }
-            if (viewHolder.imgDialogxMenuSelection != null) {
-                if (bottomMenu.getStyle().overrideBottomDialogRes() != null && bottomMenu.getStyle().overrideBottomDialogRes().selectionImageTint(bottomMenu.isLightTheme())) {
-                    viewHolder.imgDialogxMenuSelection.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
-                } else {
-                    viewHolder.imgDialogxMenuSelection.setImageTintList(null);
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                if (viewHolder.imgDialogxMenuSelection != null) {
+                    if (bottomMenu.getStyle().overrideBottomDialogRes() != null && bottomMenu.getStyle().overrideBottomDialogRes().selectionImageTint(bottomMenu.isLightTheme())) {
+                        viewHolder.imgDialogxMenuSelection.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
+                    } else {
+                        viewHolder.imgDialogxMenuSelection.setImageTintList(null);
+                    }
                 }
             }
             
@@ -173,9 +176,10 @@ public class BottomMenuArrayAdapter extends BaseAdapter {
                 if (resId != 0) {
                     viewHolder.imgDialogxMenuIcon.setVisibility(View.VISIBLE);
                     viewHolder.imgDialogxMenuIcon.setImageResource(resId);
-                    
-                    if (autoTintIconInLightOrDarkMode) {
-                        viewHolder.imgDialogxMenuIcon.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
+                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                        if (autoTintIconInLightOrDarkMode) {
+                            viewHolder.imgDialogxMenuIcon.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
+                        }
                     }
                 } else {
                     viewHolder.imgDialogxMenuIcon.setVisibility(View.GONE);

+ 5 - 3
DialogX/src/main/java/com/kongzue/dialogx/util/PopMenuArrayAdapter.java

@@ -2,6 +2,7 @@ package com.kongzue.dialogx.util;
 
 import android.content.Context;
 import android.content.res.ColorStateList;
+import android.os.Build;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -79,9 +80,10 @@ public class PopMenuArrayAdapter extends BaseAdapter {
             if (resId != 0) {
                 viewHolder.imgDialogxMenuIcon.setVisibility(View.VISIBLE);
                 viewHolder.imgDialogxMenuIcon.setImageResource(resId);
-            
-                if (autoTintIconInLightOrDarkMode) {
-                    viewHolder.imgDialogxMenuIcon.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                    if (autoTintIconInLightOrDarkMode) {
+                        viewHolder.imgDialogxMenuIcon.setImageTintList(ColorStateList.valueOf(context.getResources().getColor(textColor)));
+                    }
                 }
             } else {
                 viewHolder.imgDialogxMenuIcon.setVisibility(View.GONE);

+ 7 - 0
DialogX/src/main/res/drawable-v21/button_dialogx_material_light.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:color="@color/black10">
+
+    <item android:drawable="@drawable/rect_dialogx_material_button_light_forword"/>
+</ripple>

+ 7 - 0
DialogX/src/main/res/drawable-v21/button_dialogx_material_night.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:color="@color/white10">
+
+    <item android:drawable="@drawable/rect_dialogx_material_button_night_forword"/>
+</ripple>

+ 5 - 6
DialogX/src/main/res/drawable/button_dialogx_material_light.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:color="@color/black10">
-
-    <item android:drawable="@drawable/rect_dialogx_material_button_light_forword"/>
-</ripple>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/rect_dialogx_low_api_material_button_press" />
+    <item android:state_focused="true" android:drawable="@color/empty" />
+    <item android:drawable="@color/empty"/>
+</selector>

+ 5 - 6
DialogX/src/main/res/drawable/button_dialogx_material_night.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:color="@color/white10">
-
-    <item android:drawable="@drawable/rect_dialogx_material_button_night_forword"/>
-</ripple>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/rect_dialogx_low_api_material_button_press_night" />
+    <item android:state_focused="true" android:drawable="@color/empty" />
+    <item android:drawable="@color/empty"/>
+</selector>

+ 6 - 0
DialogX/src/main/res/drawable/rect_dialogx_low_api_material_button_press.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="@color/black10"/>
+    <corners android:radius="3dp" />
+</shape>

+ 6 - 0
DialogX/src/main/res/drawable/rect_dialogx_low_api_material_button_press_night.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="@color/white10"/>
+    <corners android:radius="3dp" />
+</shape>

+ 1 - 1
DialogXIOSStyle/build.gradle

@@ -7,7 +7,7 @@ android {
     compileSdkVersion 30
 
     defaultConfig {
-        minSdkVersion 21
+        minSdkVersion 19
         targetSdkVersion 30
     }
 

+ 1 - 1
DialogXKongzueStyle/build.gradle

@@ -7,7 +7,7 @@ android {
     compileSdkVersion 30
 
     defaultConfig {
-        minSdkVersion 21
+        minSdkVersion 19
         targetSdkVersion 30
     }
 

+ 1 - 1
DialogXMIUIStyle/build.gradle

@@ -7,7 +7,7 @@ android {
     compileSdkVersion 30
 
     defaultConfig {
-        minSdkVersion 21
+        minSdkVersion 19
         targetSdkVersion 30
     }
 

+ 2 - 2
app/build.gradle

@@ -5,7 +5,7 @@ android {
 
     defaultConfig {
         applicationId "com.kongzue.dialogxdemo"
-        minSdkVersion 21
+        minSdkVersion 19
         targetSdkVersion 30
         versionCode BUILD_VERSION_INT as int
         versionName BUILD_VERSION
@@ -40,7 +40,7 @@ dependencies {
     implementation project(path: ':DialogXKongzueStyle')
     implementation project(path: ':DialogXMIUIStyle')
 
-    implementation 'com.github.kongzue:DialogXStyle-Snackbar:1.0.6'
+    //implementation 'com.github.kongzue:DialogXStyle-Snackbar:1.0.6'
     implementation 'com.google.android.material:material:1.4.0'
     implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
 }

+ 4 - 1
app/src/main/java/com/kongzue/dialogxdemo/activity/MainActivity.java

@@ -10,6 +10,7 @@ import android.net.Uri;
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.view.inputmethod.InputMethodManager;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
@@ -178,6 +179,8 @@ public class MainActivity extends BaseActivity {
     
     @Override
     public void initDatas(JumpParameter parameter) {
+        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+        
         refreshUIMode();
         boolean showBreak = parameter.getBoolean("showBreak");
         if (showBreak) {
@@ -693,7 +696,7 @@ public class MainActivity extends BaseActivity {
         btnShowBreak.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                //jump(MainActivity.class, new JumpParameter().put("showBreak", true).put("fromActivity", getInstanceKey()));
+                jump(MainActivity.class, new JumpParameter().put("showBreak", true).put("fromActivity", getInstanceKey()));
             }
         });
         

+ 1 - 1
app/src/main/res/layout/layout_custom_view.xml

@@ -15,7 +15,7 @@
             android:id="@+id/img_ico"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:src="@mipmap/ic_launcher" />
+            android:src="@mipmap/img_logo" />
 
         <TextView
             android:layout_width="wrap_content"

BIN
app/src/main/res/mipmap-xxxhdpi/img_logo.png


+ 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.43.beta7
+BUILD_VERSION=0.0.43.beta8
 BUILD_VERSION_INT=42