From 6bae973ecddf43df15b498e4b65f3f75a18a6dc0 Mon Sep 17 00:00:00 2001 From: NekoInverter <42698724+NekoInverter@users.noreply.github.com> Date: Tue, 24 Mar 2020 08:49:40 +0800 Subject: [PATCH] Disabled check update Replace more alert dialog with material one Fix tint color --- app/src/main/AndroidManifest.xml | 4 +++- .../com/hippo/app/CheckBoxDialogBuilder.java | 8 +++----- .../com/hippo/app/EditTextDialogBuilder.java | 3 ++- .../hippo/app/ListCheckBoxDialogBuilder.java | 14 ++++++-------- .../hippo/ehviewer/ui/CommonOperations.java | 4 ++-- .../java/com/hippo/util/SystemUiHelper.java | 12 +----------- .../res/layout/dialog_checkbox_builder.xml | 18 ------------------ .../main/res/layout/dialog_gallery_menu.xml | 2 +- .../main/res/layout/gallery_detail_header.xml | 3 +-- app/src/main/res/layout/scene_download.xml | 15 ++++++++++----- app/src/main/res/layout/scene_favorites.xml | 17 +++++++++++------ .../main/res/layout/scene_gallery_comments.xml | 2 +- app/src/main/res/layout/scene_gallery_list.xml | 10 ++++++---- app/src/main/res/values-night/themes.xml | 2 +- app/src/main/res/values/styles.xml | 2 +- .../main/res/xml/network_security_config.xml | 6 ++++-- 16 files changed, 53 insertions(+), 69 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 22ac6e9b2..070bdcd27 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -15,6 +15,7 @@ --> @@ -36,7 +37,8 @@ android:largeHeap="true" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher_round" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + tools:ignore="UnusedAttribute"> (getContext(), R.layout.item_select_dialog, items)); - listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { - @Override - public void onItemClick(AdapterView parent, View view, int position, long id) { - if (listener != null) { - listener.onItemClick(ListCheckBoxDialogBuilder.this, mDialog, position); - } - mDialog.dismiss(); + listView.setOnItemClickListener((parent, view1, position, id) -> { + if (listener != null) { + listener.onItemClick(ListCheckBoxDialogBuilder.this, mDialog, position); } + mDialog.dismiss(); }); mCheckBox.setText(checkText); mCheckBox.setChecked(checked); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java b/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java index 09bccae73..eaae77d7e 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java @@ -68,10 +68,10 @@ public final class CommonOperations { private static boolean UPDATING; public static void checkUpdate(Activity activity, boolean feedback) { - if (!UPDATING) { + /*if (!UPDATING) { UPDATING = true; new UpdateTask(activity, feedback).executeOnExecutor(IoThreadPoolExecutor.getInstance()); - } + }*/ } private static void doAddToFavorites(Activity activity, GalleryInfo galleryInfo, diff --git a/app/src/main/java/com/hippo/util/SystemUiHelper.java b/app/src/main/java/com/hippo/util/SystemUiHelper.java index 4192405c2..c5e87b6ce 100644 --- a/app/src/main/java/com/hippo/util/SystemUiHelper.java +++ b/app/src/main/java/com/hippo/util/SystemUiHelper.java @@ -121,17 +121,7 @@ public final class SystemUiHelper { mHideRunnable = new HideRunnable(); // Create impl - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { - mImpl = new SystemUiHelperImplKK(activity, level, flags, listener); - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - mImpl = new SystemUiHelperImplJB(activity, level, flags, listener); - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - mImpl = new SystemUiHelperImplICS(activity, level, flags, listener); - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { - mImpl = new SystemUiHelperImplHC(activity, level, flags, listener); - } else { - mImpl = new SystemUiHelperImplBase(activity, level, flags, listener); - } + mImpl = new SystemUiHelperImplKK(activity, level, flags, listener); } /** diff --git a/app/src/main/res/layout/dialog_checkbox_builder.xml b/app/src/main/res/layout/dialog_checkbox_builder.xml index 6deedda71..4f06fcd03 100644 --- a/app/src/main/res/layout/dialog_checkbox_builder.xml +++ b/app/src/main/res/layout/dialog_checkbox_builder.xml @@ -19,29 +19,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - - - diff --git a/app/src/main/res/layout/dialog_gallery_menu.xml b/app/src/main/res/layout/dialog_gallery_menu.xml index b882f2ceb..20f3d628d 100644 --- a/app/src/main/res/layout/dialog_gallery_menu.xml +++ b/app/src/main/res/layout/dialog_gallery_menu.xml @@ -19,7 +19,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:layout_marginRight="@dimen/keyline_margin"> + app:srcCompat="@drawable/v_check_all_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_play_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_pause_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_delete_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_folder_move_dark_x24" + app:tint="#fff" /> - + app:srcCompat="@drawable/v_go_to_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_refresh_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_download_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_delete_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_folder_move_dark_x24" + app:tint="#fff" /> - - + app:srcCompat="@drawable/v_go_to_dark_x24" + app:tint="#fff" /> + app:srcCompat="@drawable/v_refresh_dark_x24" + app:tint="#fff" /> - - - +