From 046f649228730d2068536543fbfd303bf3ad7a10 Mon Sep 17 00:00:00 2001 From: A117870935 Date: Mon, 12 Jun 2023 15:18:31 +0530 Subject: [PATCH] Snackbar theme customized. --- .../android/ui/activity/EditorWebView.java | 1 - .../android/ui/activity/FileActivity.java | 3 - .../owncloud/android/utils/PermissionUtil.kt | 2 +- app/src/main/res/values-night/colors.xml | 64 +++++++++++++ app/src/main/res/values-night/themes.xml | 4 + app/src/main/res/values/colors.xml | 89 +++++++++++++++++++ app/src/main/res/values/styles.xml | 25 ++++++ app/src/main/res/values/themes.xml | 4 + 8 files changed, 187 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java b/app/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java index de413a8087e7..1121bb680f9f 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/EditorWebView.java @@ -82,7 +82,6 @@ public void onUrlLoaded(String loadedUrl) { R.string.timeout_richDocuments, Snackbar.LENGTH_INDEFINITE) .setAction(R.string.common_cancel, v -> closeView()); - viewThemeUtils.material.themeSnackbar(snackbar); setLoadingSnackbar(snackbar); snackbar.show(); } diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java index f398dd6d8c3d..dd47ecbfee17 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/FileActivity.java @@ -690,7 +690,6 @@ public static void copyAndShareFileLink(FileActivity activity, Snackbar snackbar = Snackbar.make(activity.findViewById(android.R.id.content), R.string.clipboard_text_copied, Snackbar.LENGTH_LONG) .setAction(R.string.share, v -> showShareLinkDialog(activity, file, link)); - viewThemeUtils.material.themeSnackbar(snackbar); snackbar.show(); } @@ -759,7 +758,6 @@ private void onUpdateShareInformation(RemoteOperationResult result, @StringRes i snackbar = Snackbar.make(sharingFragment.getView(), result.getMessage(), Snackbar.LENGTH_LONG); } - viewThemeUtils.material.themeSnackbar(snackbar); snackbar.show(); } } @@ -829,7 +827,6 @@ private void onCreateShareViaLinkOperationFinish(CreateShareViaLinkOperation ope operation, getResources()), Snackbar.LENGTH_LONG); - viewThemeUtils.material.themeSnackbar(snackbar); snackbar.show(); } } diff --git a/app/src/main/java/com/owncloud/android/utils/PermissionUtil.kt b/app/src/main/java/com/owncloud/android/utils/PermissionUtil.kt index 32139657d67e..4562930b599c 100644 --- a/app/src/main/java/com/owncloud/android/utils/PermissionUtil.kt +++ b/app/src/main/java/com/owncloud/android/utils/PermissionUtil.kt @@ -174,7 +174,7 @@ object PermissionUtil { Snackbar.LENGTH_INDEFINITE ).setAction(R.string.common_ok) { doRequest() - }.also { viewThemeUtils.material.themeSnackbar(it) }.show() + }.show() } else { // No explanation needed, request the permission. doRequest() diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index e9c749b86943..76e4e05ca495 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -36,4 +36,68 @@ #1E1E1E @android:color/white + + + #FFFFFF + @color/grey_30 + @color/grey_30 + #CCCCCC + @color/grey_70 + @color/grey_80 + #2D2D2D + @color/grey_70 + @color/grey_70 + + + @color/grey_80 + @color/grey_0 + + + @color/grey_80 + @color/grey_0 + + + @color/grey_60 + @color/grey_0 + @color/grey_0 + @color/grey_30 + #FFFFFF + @color/grey_30 + @color/grey_80 + #FFFFFF + + + @color/grey_80 + @color/grey_30 + @color/grey_0 + + + @color/grey_80 + @color/grey_0 + @color/grey_80 + + + @color/grey_70 + @color/grey_60 + + + @color/grey_70 + @color/grey_70 + + + #FFFFFF + @color/grey_30 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_60 + @color/grey_0 + #FFFFFF + + + #121212 + @color/grey_0 + @color/grey_80 + @color/grey_80 diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index e8e9719ea7a9..56ded1464d3f 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -19,6 +19,10 @@ false true true + + @style/SnackBarBackgroundStyle + @style/SnackBarActionButtonStyle + @style/SnackBarTextViewStyle @style/Widget.App.TextInputLayout @style/Nextcloud.Widget.PopupMenu @style/ThemeOverlay.App.BottomSheetDialog diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d28fe7946729..94645a1e2784 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -75,4 +75,93 @@ @android:color/white #666666 #A5A5A5 + + + #191919 + @color/primary + #191919 + #191919 + @color/grey_30 + @android:color/white + #FFFFFF + @color/grey_0 + #CCCCCC + #77c4ff + #B3FFFFFF + @color/grey_10 + + + #101010 + #F2F2F2 + #E5E5E5 + #B2B2B2 + #666666 + #4C4C4C + #333333 + + + @color/design_snackbar_background_color + @color/white + + + #FFFFFF + #191919 + + + @color/grey_0 + #191919 + @color/primary + #191919 + @color/primary + @color/grey_30 + @color/white + #191919 + + + #FFFFFF + #191919 + #191919 + + + #FFFFFF + #191919 + #FFFFFF + + + @color/primary + #F399C7 + #FFFFFF + @color/grey_30 + @color/grey_10 + @color/grey_0 + + + @color/primary + @color/grey_30 + @color/grey_30 + #CCCCCC + + + #191919 + @color/grey_30 + #191919 + #191919 + #191919 + #191919 + @color/grey_30 + #191919 + #000000 + #191919 + #F6E5EB + #C16F81 + #0D39DF + #0099ff + + + @color/grey_0 + #191919 + @color/grey_0 + @color/grey_30 + #77b6bb + #5077b6bb diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 1a8b501ee4b7..1809e99619cb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -27,6 +27,10 @@ @color/primary_dark @color/secondary_text_color @style/ownCloud.SearchView + + @style/SnackBarBackgroundStyle + @style/SnackBarActionButtonStyle + @style/SnackBarTextViewStyle @color/action_mode_background @style/FallbackDatePickerDialogTheme @color/bg_default @@ -45,6 +49,10 @@ @color/bg_default @color/secondary_text_color @style/FallbackTheming.Dialog + + @style/SnackBarBackgroundStyle + @style/SnackBarActionButtonStyle + @style/SnackBarTextViewStyle @color/action_mode_background @style/FallbackDatePickerDialogTheme @color/bg_default @@ -280,6 +288,10 @@ + + + + + +