1
0
kongzue 2 жил өмнө
parent
commit
6c7d4a9fa4

+ 3 - 2
app/build.gradle

@@ -28,8 +28,8 @@ repositories {
 }
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
-    implementation 'androidx.appcompat:appcompat:1.2.0'
-    implementation 'com.github.kongzue:BaseFramework:6.7.9.5'
+    implementation 'androidx.appcompat:appcompat:1.3.0'
+    implementation 'com.github.kongzue:BaseFramework:6.8.4'
 
 //    implementation 'com.github.kongzue.DialogX:DialogXIOSStyle:0.0.39.debug4'
 //    implementation 'com.github.kongzue.DialogX:DialogXKongzueStyle:0.0.39.debug4'
@@ -43,5 +43,6 @@ dependencies {
     //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'
+    implementation 'com.github.kongzue:StackLabel:1.1.8'
     implementation project(path: ':DialogXMaterialYou')
 }

BIN
app/release/app-release.apk


+ 1 - 1
app/release/output-metadata.json

@@ -11,7 +11,7 @@
       "type": "SINGLE",
       "filters": [],
       "versionCode": 45,
-      "versionName": "0.0.46.beta1",
+      "versionName": "0.0.46.beta3",
       "outputFile": "app-release.apk"
     }
   ]

+ 58 - 56
app/src/main/java/com/kongzue/dialogxdemo/activity/MainActivity.java

@@ -34,6 +34,8 @@ import androidx.constraintlayout.widget.ConstraintLayout;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.google.android.material.button.MaterialButton;
+import com.google.android.material.button.MaterialButtonToggleGroup;
 import com.kongzue.baseframework.BaseActivity;
 import com.kongzue.baseframework.interfaces.DarkNavigationBarTheme;
 import com.kongzue.baseframework.interfaces.DarkStatusBarTheme;
@@ -91,56 +93,56 @@ public class MainActivity extends BaseActivity {
     private ImageView btnShare;
     private ImageView splitBody;
     private LinearLayout boxBody;
-    private RadioGroup grpStyle;
-    private RadioButton rdoMaterial;
-    private RadioButton rdoIos;
-    private RadioButton rdoKongzue;
-    private RadioButton rdoMiui;
-    private RadioButton rdoMaterialYou;
-    private RadioGroup grpTheme;
-    private RadioButton rdoAuto;
-    private RadioButton rdoLight;
-    private RadioButton rdoDark;
-    private RadioGroup grpMode;
-    private RadioButton rdoModeView;
-    private RadioButton rdoModeWindow;
-    private RadioButton rdoModeDialogFragment;
-    private RadioButton rdoModeFloatingActivity;
-    private TextView btnMessageDialog;
-    private TextView btnSelectDialog;
-    private TextView btnInputDialog;
-    private TextView btnWaitDialog;
-    private TextView btnWaitAndTipDialog;
-    private TextView btnTipSuccess;
-    private TextView btnTipWarning;
-    private TextView btnTipError;
-    private TextView btnTipProgress;
-    private TextView btnPoptip;
-    private TextView btnPoptipBigMessage;
-    private TextView btnPoptipSuccess;
-    private TextView btnPoptipWarning;
-    private TextView btnPoptipError;
-    private TextView btnPopnotification;
-    private TextView btnPopnotificationBigMessage;
-    private TextView btnPopnotificationOverlay;
-    private TextView btnBottomDialog;
-    private TextView btnBottomMenu;
-    private TextView btnBottomReply;
-    private TextView btnBottomSelectMenu;
-    private TextView btnBottomMultiSelectMenu;
-    private TextView btnBottomCustomRecycleView;
-    private TextView btnCustomMessageDialog;
-    private TextView btnCustomInputDialog;
-    private TextView btnCustomBottomMenu;
-    private TextView btnCustomDialog;
-    private TextView btnCustomDialogAlign;
-    private TextView btnFullScreenDialogWebPage;
-    private TextView btnFullScreenDialogLogin;
-    private TextView btnFullScreenDialogFragment;
-    private TextView btnContextMenu;
+    private MaterialButtonToggleGroup grpStyle;
+    private MaterialButton rdoMaterial;
+    private MaterialButton rdoIos;
+    private MaterialButton rdoKongzue;
+    private MaterialButton rdoMiui;
+    private MaterialButton rdoMaterialYou;
+    private MaterialButtonToggleGroup grpTheme;
+    private MaterialButton rdoAuto;
+    private MaterialButton rdoLight;
+    private MaterialButton rdoDark;
+    private MaterialButtonToggleGroup grpMode;
+    private MaterialButton rdoModeView;
+    private MaterialButton rdoModeWindow;
+    private MaterialButton rdoModeDialogFragment;
+    private MaterialButton rdoModeFloatingActivity;
+    private MaterialButton btnMessageDialog;
+    private MaterialButton btnSelectDialog;
+    private MaterialButton btnInputDialog;
+    private MaterialButton btnWaitDialog;
+    private MaterialButton btnWaitAndTipDialog;
+    private MaterialButton btnTipSuccess;
+    private MaterialButton btnTipWarning;
+    private MaterialButton btnTipError;
+    private MaterialButton btnTipProgress;
+    private MaterialButton btnPoptip;
+    private MaterialButton btnPoptipBigMessage;
+    private MaterialButton btnPoptipSuccess;
+    private MaterialButton btnPoptipWarning;
+    private MaterialButton btnPoptipError;
+    private MaterialButton btnPopnotification;
+    private MaterialButton btnPopnotificationBigMessage;
+    private MaterialButton btnPopnotificationOverlay;
+    private MaterialButton btnBottomDialog;
+    private MaterialButton btnBottomMenu;
+    private MaterialButton btnBottomReply;
+    private MaterialButton btnBottomSelectMenu;
+    private MaterialButton btnBottomMultiSelectMenu;
+    private MaterialButton btnBottomCustomRecycleView;
+    private MaterialButton btnCustomMessageDialog;
+    private MaterialButton btnCustomInputDialog;
+    private MaterialButton btnCustomBottomMenu;
+    private MaterialButton btnCustomDialog;
+    private MaterialButton btnCustomDialogAlign;
+    private MaterialButton btnFullScreenDialogWebPage;
+    private MaterialButton btnFullScreenDialogLogin;
+    private MaterialButton btnFullScreenDialogFragment;
+    private MaterialButton btnContextMenu;
     private TextView btnSelectMenu;
-    private TextView btnShowBreak;
-    private TextView btnListDialog;
+    private MaterialButton btnShowBreak;
+    private MaterialButton btnListDialog;
     private TextView txtVer;
     
     @Override
@@ -283,9 +285,9 @@ public class MainActivity extends BaseActivity {
     
     @Override
     public void setEvents() {
-        grpMode.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+        grpMode.addOnButtonCheckedListener(new MaterialButtonToggleGroup.OnButtonCheckedListener() {
             @Override
-            public void onCheckedChanged(RadioGroup group, int checkedId) {
+            public void onButtonChecked(MaterialButtonToggleGroup group, int checkedId, boolean isChecked) {
                 BaseDialog.cleanAll();
                 switch (checkedId) {
                     case R.id.rdo_mode_view:
@@ -304,9 +306,9 @@ public class MainActivity extends BaseActivity {
             }
         });
         
-        grpTheme.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+        grpTheme.addOnButtonCheckedListener(new MaterialButtonToggleGroup.OnButtonCheckedListener() {
             @Override
-            public void onCheckedChanged(RadioGroup group, int checkedId) {
+            public void onButtonChecked(MaterialButtonToggleGroup group, int checkedId, boolean isChecked) {
                 switch (checkedId) {
                     case R.id.rdo_auto:
                         DialogX.globalTheme = DialogX.THEME.AUTO;
@@ -320,10 +322,10 @@ public class MainActivity extends BaseActivity {
                 }
             }
         });
-        
-        grpStyle.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+    
+        grpStyle.addOnButtonCheckedListener(new MaterialButtonToggleGroup.OnButtonCheckedListener() {
             @Override
-            public void onCheckedChanged(RadioGroup group, int checkedId) {
+            public void onButtonChecked(MaterialButtonToggleGroup group, int checkedId, boolean isChecked) {
                 DialogX.cancelButtonText = "取消";
                 DialogX.titleTextInfo = null;
                 DialogX.buttonTextInfo = null;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 232 - 223
app/src/main/res/layout/activity_main.xml


BIN
app/src/main/res/mipmap-xxhdpi/img_button_alert.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_big_poptip.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_error.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_inputdialog.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_messagedialog.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_progressing.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_right.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_selectdialog.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_simple_poptip.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_waiting.png


BIN
app/src/main/res/mipmap-xxhdpi/img_button_warning.png


BIN
app/src/main/res/mipmap-xxhdpi/img_theme_auto.png


BIN
app/src/main/res/mipmap-xxhdpi/img_theme_light.png


BIN
app/src/main/res/mipmap-xxhdpi/img_theme_night.png


+ 1 - 1
app/src/main/res/values/colors.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorPrimary">#6200EE</color>
+    <color name="colorPrimary">#696973</color>
     <color name="colorPrimaryDark">@color/white</color>
     <color name="colorAccent">#2196F3</color>
 

+ 3 - 3
app/src/main/res/values/styles.xml

@@ -1,13 +1,13 @@
 <resources>
     <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+    <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
         <!-- Customize your theme here. -->
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
         <item name="colorAccent">@color/colorAccent</item>
     </style>
 
-    <style name="AppCompatTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+    <style name="AppCompatTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
         <!-- Customize your theme here. -->
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@@ -15,7 +15,7 @@
     </style>
 
     <!-- Base application theme. -->
-    <style name="AppThemeDark" parent="Theme.AppCompat.NoActionBar">
+    <style name="AppThemeDark" parent="Theme.MaterialComponents.Light.NoActionBar">
         <!-- Customize your theme here. -->
         <item name="colorPrimary">@color/colorPrimary</item>
         <item name="colorPrimaryDark">@color/colorPrimaryDark</item>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно