diff --git a/README-CN.md b/README-CN.md index fa5513da316e36dacffb86fbedba7dbaf1c13033..d1896df83a0ef4e9bf6da18f65ae8160d3806f6e 100644 --- a/README-CN.md +++ b/README-CN.md @@ -41,7 +41,7 @@ [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png -[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.0-brightgreen.svg +[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.1-brightgreen.svg [auc]: https://github.com/Blankj/AndroidUtilCode [apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg diff --git a/README.md b/README.md index 977d352d19ad8181d2d7575b8103ec5410fd52be..2827f62ff0ccfe30ba0b94ca1dc5ce1bc0f41cd6 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png -[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.0-brightgreen.svg +[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.20.1-brightgreen.svg [auc]: https://github.com/Blankj/AndroidUtilCode [apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg diff --git a/app/src/main/java/com/blankj/androidutilcode/MainActivity.java b/app/src/main/java/com/blankj/androidutilcode/MainActivity.java index 8cd21dfecd5cac4a0d849594ca373aba952daa7f..3dc5146f4f14036044c315e28755e289ef0902f6 100644 --- a/app/src/main/java/com/blankj/androidutilcode/MainActivity.java +++ b/app/src/main/java/com/blankj/androidutilcode/MainActivity.java @@ -12,6 +12,7 @@ import com.blankj.androidutilcode.base.BaseDrawerActivity; import com.blankj.androidutilcode.feature.core.CoreUtilActivity; import com.blankj.androidutilcode.feature.sub.SubUtilActivity; import com.blankj.utilcode.util.BarUtils; +import com.blankj.utilcode.util.EncryptUtils; /** *
diff --git a/app/src/main/java/com/blankj/androidutilcode/base/BaseActivity.java b/app/src/main/java/com/blankj/androidutilcode/base/BaseActivity.java
index 14276177a085bdbfa4dfce46502fc2e1fbbb3d80..0afee9c3f8d6754ff0ff686b62612a6d67ced40a 100644
--- a/app/src/main/java/com/blankj/androidutilcode/base/BaseActivity.java
+++ b/app/src/main/java/com/blankj/androidutilcode/base/BaseActivity.java
@@ -31,6 +31,7 @@ public abstract class BaseActivity extends AppCompatActivity
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        ScreenUtils.adaptScreen4VerticalSlide(this, 720);
         super.onCreate(savedInstanceState);
         mActivity = this;
         Bundle bundle = getIntent().getExtras();
diff --git a/app/src/main/java/com/blankj/androidutilcode/feature/core/path/PathActivity.java b/app/src/main/java/com/blankj/androidutilcode/feature/core/path/PathActivity.java
index 4d7167f5ebe6e142bf9467b8236df0847179bac3..41a9850f2b68ec4f308b6ec5bf26fbde2b21ff4d 100644
--- a/app/src/main/java/com/blankj/androidutilcode/feature/core/path/PathActivity.java
+++ b/app/src/main/java/com/blankj/androidutilcode/feature/core/path/PathActivity.java
@@ -9,6 +9,7 @@ import android.widget.TextView;
 
 import com.blankj.androidutilcode.R;
 import com.blankj.androidutilcode.base.BaseBackActivity;
+import com.blankj.utilcode.util.PathUtils;
 import com.blankj.utilcode.util.SpanUtils;
 
 /**
@@ -42,7 +43,45 @@ public class PathActivity extends BaseBackActivity {
 
         TextView tvAboutMetaData = findViewById(R.id.tv_about_path);
         tvAboutMetaData.setText(new SpanUtils()
-//                .appendLine("getRootPath: " + PathUtils.getRootPath())
+                .appendLine("getRootPath: " + PathUtils.getRootPath())
+                .appendLine("getDataPath: " + PathUtils.getDataPath())
+                .appendLine("getDownloadCachePath: " + PathUtils.getDownloadCachePath())
+
+                .appendLine("getInternalAppDataPath: " + PathUtils.getInternalAppDataPath())
+                .appendLine("getInternalAppCodeCacheDir: " + PathUtils.getInternalAppCodeCacheDir())
+                .appendLine("getInternalAppCachePath: " + PathUtils.getInternalAppCachePath())
+                .appendLine("getInternalAppDbsPath: " + PathUtils.getInternalAppDbsPath())
+                .appendLine("getInternalAppDbPath: " + PathUtils.getInternalAppDbPath("demo"))
+                .appendLine("getInternalAppFilesPath: " + PathUtils.getInternalAppFilesPath())
+                .appendLine("getInternalAppSpPath: " + PathUtils.getInternalAppSpPath())
+                .appendLine("getInternalAppNoBackupFilesPath: " + PathUtils.getInternalAppNoBackupFilesPath())
+
+                .appendLine("getExternalStoragePath: " + PathUtils.getExternalStoragePath())
+                .appendLine("getExternalMusicPath: " + PathUtils.getExternalMusicPath())
+                .appendLine("getExternalPodcastsPath: " + PathUtils.getExternalPodcastsPath())
+                .appendLine("getExternalRingtonesPath: " + PathUtils.getExternalRingtonesPath())
+                .appendLine("getExternalAlarmsPath: " + PathUtils.getExternalAlarmsPath())
+                .appendLine("getExternalNotificationsPath: " + PathUtils.getExternalNotificationsPath())
+                .appendLine("getExternalPicturesPath: " + PathUtils.getExternalPicturesPath())
+                .appendLine("getExternalMoviesPath: " + PathUtils.getExternalMoviesPath())
+                .appendLine("getExternalDownloadsPath: " + PathUtils.getExternalDownloadsPath())
+                .appendLine("getExternalDcimPath: " + PathUtils.getExternalDcimPath())
+                .appendLine("getExternalDocumentsPath: " + PathUtils.getExternalDocumentsPath())
+
+                .appendLine("getExternalAppDataPath: " + PathUtils.getExternalAppDataPath())
+                .appendLine("getExternalAppCachePath: " + PathUtils.getExternalAppCachePath())
+                .appendLine("getExternalAppFilesPath: " + PathUtils.getExternalAppFilesPath())
+                .appendLine("getExternalAppMusicPath: " + PathUtils.getExternalAppMusicPath())
+                .appendLine("getExternalAppPodcastsPath: " + PathUtils.getExternalAppPodcastsPath())
+                .appendLine("getExternalAppRingtonesPath: " + PathUtils.getExternalAppRingtonesPath())
+                .appendLine("getExternalAppAlarmsPath: " + PathUtils.getExternalAppAlarmsPath())
+                .appendLine("getExternalAppNotificationsPath: " + PathUtils.getExternalAppNotificationsPath())
+                .appendLine("getExternalAppPicturesPath: " + PathUtils.getExternalAppPicturesPath())
+                .appendLine("getExternalAppMoviesPath: " + PathUtils.getExternalAppMoviesPath())
+                .appendLine("getExternalAppDownloadPath: " + PathUtils.getExternalAppDownloadPath())
+                .appendLine("getExternalAppDcimPath: " + PathUtils.getExternalAppDcimPath())
+                .appendLine("getExternalAppDocumentsPath: " + PathUtils.getExternalAppDocumentsPath())
+                .appendLine("getExternalAppObbPath: " + PathUtils.getExternalAppObbPath())
                 .append("")
                 .create());
     }
diff --git a/app/src/main/java/com/blankj/androidutilcode/feature/core/permission/PermissionActivity.java b/app/src/main/java/com/blankj/androidutilcode/feature/core/permission/PermissionActivity.java
index 7c85393dd2d11e0742fd532fbf224513bcb10e6e..8e92f82812a4d52647b3f5931026a16365c5b8f2 100644
--- a/app/src/main/java/com/blankj/androidutilcode/feature/core/permission/PermissionActivity.java
+++ b/app/src/main/java/com/blankj/androidutilcode/feature/core/permission/PermissionActivity.java
@@ -56,6 +56,7 @@ public class PermissionActivity extends BaseBackActivity {
         findViewById(R.id.btn_open_app_settings).setOnClickListener(this);
         findViewById(R.id.btn_request_calendar).setOnClickListener(this);
         findViewById(R.id.btn_request_record_audio).setOnClickListener(this);
+        findViewById(R.id.btn_request_calendar_and_record_audio).setOnClickListener(this);
 
         StringBuilder sb = new StringBuilder();
         for (String s : PermissionUtils.getPermissions()) {
@@ -139,6 +140,32 @@ public class PermissionActivity extends BaseBackActivity {
                         })
                         .request();
                 break;
+            case R.id.btn_request_calendar_and_record_audio:
+                PermissionUtils.permission(PermissionConstants.CALENDAR, PermissionConstants.MICROPHONE)
+                        .rationale(new PermissionUtils.OnRationaleListener() {
+                            @Override
+                            public void rationale(final ShouldRequest shouldRequest) {
+                                DialogHelper.showRationaleDialog(shouldRequest);
+                            }
+                        })
+                        .callback(new PermissionUtils.FullCallback() {
+                            @Override
+                            public void onGranted(List permissionsGranted) {
+                                updateAboutPermission();
+                                LogUtils.d(permissionsGranted);
+                            }
+
+                            @Override
+                            public void onDenied(List permissionsDeniedForever,
+                                                 List permissionsDenied) {
+                                if (!permissionsDeniedForever.isEmpty()) {
+                                    DialogHelper.showOpenAppSettingDialog();
+                                }
+                                LogUtils.d(permissionsDeniedForever, permissionsDenied);
+                            }
+                        })
+                        .request();
+                break;
         }
     }
 
diff --git a/app/src/main/java/com/blankj/androidutilcode/feature/core/toast/ToastActivity.java b/app/src/main/java/com/blankj/androidutilcode/feature/core/toast/ToastActivity.java
index c360cfe7c731493d8cbfeb97b8bb44f61cd61dd8..d36fb3165920e480c919ef0e45a3cb71b51f7cb8 100644
--- a/app/src/main/java/com/blankj/androidutilcode/feature/core/toast/ToastActivity.java
+++ b/app/src/main/java/com/blankj/androidutilcode/feature/core/toast/ToastActivity.java
@@ -8,12 +8,14 @@ import android.support.annotation.Nullable;
 import android.support.v4.content.ContextCompat;
 import android.view.Gravity;
 import android.view.View;
+import android.widget.Toast;
 
 import com.blankj.androidutilcode.R;
 import com.blankj.androidutilcode.base.BaseBackActivity;
 import com.blankj.utilcode.util.SizeUtils;
 import com.blankj.utilcode.util.SpanUtils;
 import com.blankj.utilcode.util.ToastUtils;
+import com.blankj.utilcode.util.Utils;
 
 /**
  * 
diff --git a/app/src/main/res_core/layout/activity_keyboard1.xml b/app/src/main/res_core/layout/activity_keyboard1.xml
deleted file mode 100644
index aae8a3925bb602958f8f52b09cda62713bf7747d..0000000000000000000000000000000000000000
--- a/app/src/main/res_core/layout/activity_keyboard1.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-    
-
-