diff --git a/AndroidProject.apk b/AndroidProject.apk deleted file mode 100644 index 5f163a78..00000000 Binary files a/AndroidProject.apk and /dev/null differ diff --git a/README.md b/README.md index 96e1ed0e..10a7b317 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ * AndroidProject 已维护三年多的时间,几乎耗尽我所有的业余时间,里面的代码改了再改,改了又改,不断 Review、不断创新、不断改进、不断测试、不断优化,每天都在重复这些枯燥的步骤,但是只有这样才能把这件事做好,因为我相信把同样一件事重复做,迟早有一天可以做好。 -* 已经正式投入到多个公司项目实践中,暂时没有发现任何问题或者 Bug,[点击下载 Apk 体验](AndroidProject.apk),又或者扫码下载 +* 已经正式投入到多个公司项目实践中,暂时没有发现任何问题或者 Bug,[点击下载 Apk 体验](https://github.com/getActivity/AndroidProject/releases/download/13.1/AndroidProject.apk),又或者扫码下载 ![](picture/demo_code.png) @@ -96,27 +96,39 @@ #### [代码规范文档请点击这里查看](https://github.com/getActivity/AndroidCodeStandard) +#### [版本适配文档请点击这里查看](https://github.com/getActivity/AndroidVersionAdapter) + #### [常见问题解答请点击这里查看](HelpDoc.md) #### 作者的其他开源项目 -* 网络框架:[EasyHttp](https://github.com/getActivity/EasyHttp) (已集成) +* 权限框架:[XXPermissions](https://github.com/getActivity/XXPermissions) ![](https://img.shields.io/github/stars/getActivity/XXPermissions.svg) ![](https://img.shields.io/github/forks/getActivity/XXPermissions.svg) + +* 吐司框架:[ToastUtils](https://github.com/getActivity/ToastUtils) ![](https://img.shields.io/github/stars/getActivity/ToastUtils.svg) ![](https://img.shields.io/github/forks/getActivity/ToastUtils.svg) + +* 网络框架:[EasyHttp](https://github.com/getActivity/EasyHttp) ![](https://img.shields.io/github/stars/getActivity/EasyHttp.svg) ![](https://img.shields.io/github/forks/getActivity/EasyHttp.svg) + +* 标题栏框架:[TitleBar](https://github.com/getActivity/TitleBar) ![](https://img.shields.io/github/stars/getActivity/TitleBar.svg) ![](https://img.shields.io/github/forks/getActivity/TitleBar.svg) + +* 悬浮窗框架:[XToast](https://github.com/getActivity/XToast) ![](https://img.shields.io/github/stars/getActivity/XToast.svg) ![](https://img.shields.io/github/forks/getActivity/XToast.svg) + +* Shape 框架:[ShapeView](https://github.com/getActivity/ShapeView) ![](https://img.shields.io/github/stars/getActivity/ShapeView.svg) ![](https://img.shields.io/github/forks/getActivity/ShapeView.svg) -* 权限框架:[XXPermissions](https://github.com/getActivity/XXPermissions) (已集成) +* 语种切换框架:[MultiLanguages](https://github.com/getActivity/MultiLanguages) ![](https://img.shields.io/github/stars/getActivity/MultiLanguages.svg) ![](https://img.shields.io/github/forks/getActivity/MultiLanguages.svg) -* 吐司框架:[ToastUtils](https://github.com/getActivity/ToastUtils) (已集成) +* Gson 解析容错:[GsonFactory](https://github.com/getActivity/GsonFactory) ![](https://img.shields.io/github/stars/getActivity/GsonFactory.svg) ![](https://img.shields.io/github/forks/getActivity/GsonFactory.svg) -* 标题栏框架:[TitleBar](https://github.com/getActivity/TitleBar) (已集成) +* 日志查看框架:[Logcat](https://github.com/getActivity/Logcat) ![](https://img.shields.io/github/stars/getActivity/Logcat.svg) ![](https://img.shields.io/github/forks/getActivity/Logcat.svg) -* Gson 解析容错:[GsonFactory](https://github.com/getActivity/GsonFactory) (已集成) +* Android 版本适配:[AndroidVersionAdapter](https://github.com/getActivity/AndroidVersionAdapter) ![](https://img.shields.io/github/stars/getActivity/AndroidVersionAdapter.svg) ![](https://img.shields.io/github/forks/getActivity/AndroidVersionAdapter.svg) -* Shape 框架:[ShapeView](https://github.com/getActivity/ShapeView) (已集成) +* Android 代码规范:[AndroidCodeStandard](https://github.com/getActivity/AndroidCodeStandard) ![](https://img.shields.io/github/stars/getActivity/AndroidCodeStandard.svg) ![](https://img.shields.io/github/forks/getActivity/AndroidCodeStandard.svg) -* 悬浮窗框架:[XToast](https://github.com/getActivity/XToast) (未集成) +* Studio 精品插件:[StudioPlugins](https://github.com/getActivity/StudioPlugins) ![](https://img.shields.io/github/stars/getActivity/StudioPlugins.svg) ![](https://img.shields.io/github/forks/getActivity/StudioPlugins.svg) -* 国际化框架:[MultiLanguages](https://github.com/getActivity/MultiLanguages) (未集成) +* 表情包大集合:[EmojiPackage](https://github.com/getActivity/EmojiPackage) ![](https://img.shields.io/github/stars/getActivity/EmojiPackage.svg) ![](https://img.shields.io/github/forks/getActivity/EmojiPackage.svg) -* 日志查看框架:[Logcat](https://github.com/getActivity/Logcat) (未集成) +* 省市区 Json 数据:[ProvinceJson](https://github.com/getActivity/ProvinceJson) ![](https://img.shields.io/github/stars/getActivity/ProvinceJson.svg) ![](https://img.shields.io/github/forks/getActivity/ProvinceJson.svg) #### 微信公众号:Android轮子哥 diff --git a/app/src/main/java/com/hjq/demo/action/StatusAction.java b/app/src/main/java/com/hjq/demo/action/StatusAction.java index da9f09ba..4ddd0f3b 100644 --- a/app/src/main/java/com/hjq/demo/action/StatusAction.java +++ b/app/src/main/java/com/hjq/demo/action/StatusAction.java @@ -70,7 +70,7 @@ default void showError(StatusLayout.OnRetryListener listener) { NetworkInfo info = manager.getActiveNetworkInfo(); // 判断网络是否连接 if (info == null || !info.isConnected()) { - showLayout(R.drawable.status_nerwork_ic, R.string.status_layout_error_network, listener); + showLayout(R.drawable.status_network_ic, R.string.status_layout_error_network, listener); return; } } diff --git a/app/src/main/java/com/hjq/demo/other/DebugLoggerTree.java b/app/src/main/java/com/hjq/demo/other/DebugLoggerTree.java index b5d77e24..3bd0ad9c 100644 --- a/app/src/main/java/com/hjq/demo/other/DebugLoggerTree.java +++ b/app/src/main/java/com/hjq/demo/other/DebugLoggerTree.java @@ -22,8 +22,8 @@ public final class DebugLoggerTree extends Timber.DebugTree { @Override protected String createStackElementTag(@NotNull StackTraceElement element) { String tag = "(" + element.getFileName() + ":" + element.getLineNumber() + ")"; - // 日志 TAG 长度限制已经在 Android 7.0 被移除 - if (tag.length() <= MAX_TAG_LENGTH || Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + // 日志 TAG 长度限制已经在 Android 8.0 被移除 + if (tag.length() <= MAX_TAG_LENGTH || Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { return tag; } return tag.substring(0, MAX_TAG_LENGTH); diff --git a/app/src/main/java/com/hjq/demo/ui/dialog/PayPasswordDialog.java b/app/src/main/java/com/hjq/demo/ui/dialog/PayPasswordDialog.java index 1113ad3a..35224e66 100644 --- a/app/src/main/java/com/hjq/demo/ui/dialog/PayPasswordDialog.java +++ b/app/src/main/java/com/hjq/demo/ui/dialog/PayPasswordDialog.java @@ -90,7 +90,7 @@ public Builder setSubTitle(CharSequence subTitle) { } public Builder setMoney(@StringRes int id) { - return setSubTitle(getString(id)); + return setMoney(getString(id)); } public Builder setMoney(CharSequence money) { diff --git a/app/src/main/java/com/hjq/demo/widget/BrowserView.java b/app/src/main/java/com/hjq/demo/widget/BrowserView.java index bcb00070..6cb69b5d 100644 --- a/app/src/main/java/com/hjq/demo/widget/BrowserView.java +++ b/app/src/main/java/com/hjq/demo/widget/BrowserView.java @@ -154,11 +154,9 @@ public void onStateChanged(@NonNull LifecycleOwner source, @NonNull Lifecycle.Ev switch (event) { case ON_RESUME: onResume(); - resumeTimers(); break; case ON_STOP: onPause(); - pauseTimers(); break; case ON_DESTROY: onDestroy(); diff --git a/app/src/main/res/drawable/status_nerwork_ic.xml b/app/src/main/res/drawable/status_network_ic.xml similarity index 100% rename from app/src/main/res/drawable/status_nerwork_ic.xml rename to app/src/main/res/drawable/status_network_ic.xml diff --git a/app/src/main/res/layout/widget_status_layout.xml b/app/src/main/res/layout/widget_status_layout.xml index 2b959eab..0f487db2 100644 --- a/app/src/main/res/layout/widget_status_layout.xml +++ b/app/src/main/res/layout/widget_status_layout.xml @@ -20,7 +20,7 @@ android:layout_marginBottom="@dimen/dp_10" app:lottie_autoPlay="true" app:lottie_loop="true" - tools:src="@drawable/status_nerwork_ic" /> + tools:src="@drawable/status_network_ic" />