From eb94e2847eaaf65f20e7a81abd11525482da3553 Mon Sep 17 00:00:00 2001 From: A117870935 Date: Wed, 17 May 2023 01:44:51 +0530 Subject: [PATCH] Code refactored. --- .../nmc/android/utils/SearchViewThemeUtils.kt | 2 +- .../android/ui/activity/ToolbarActivity.java | 4 +- .../owncloud/android/utils/DisplayUtils.java | 2 + app/src/main/res/values-de/strings.xml | 12 +- app/src/main/res/values-night/colors.xml | 89 ++++++++++---- app/src/main/res/values/colors.xml | 112 ++++++++++++------ app/src/main/res/values/dimens.xml | 2 +- app/src/main/res/values/strings.xml | 20 ++-- 8 files changed, 164 insertions(+), 79 deletions(-) diff --git a/app/src/main/java/com/nmc/android/utils/SearchViewThemeUtils.kt b/app/src/main/java/com/nmc/android/utils/SearchViewThemeUtils.kt index 769a460e8fb9..dc2267f10164 100644 --- a/app/src/main/java/com/nmc/android/utils/SearchViewThemeUtils.kt +++ b/app/src/main/java/com/nmc/android/utils/SearchViewThemeUtils.kt @@ -11,7 +11,7 @@ object SearchViewThemeUtils { val editText: SearchView.SearchAutoComplete = searchView.findViewById(R.id.search_src_text) editText.textSize = 16F editText.setTextColor(fontColor) - editText.highlightColor = context.resources.getColor(R.color.search_et_highlight_color, null) + editText.highlightColor = context.resources.getColor(R.color.et_highlight_color, null) editText.setHintTextColor(context.resources.getColor(R.color.fontSecondaryAppbar, null)) val closeButton: ImageView = searchView.findViewById(R.id.search_close_btn) closeButton.setColorFilter(fontColor) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java index 620643f7f7ad..7ca48c235b7a 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java @@ -74,8 +74,8 @@ public abstract class ToolbarActivity extends BaseActivity implements Injectable private LinearLayout mInfoBox; private TextView mInfoBoxMessage; protected AppCompatSpinner mToolbarSpinner; - private ImageView mToolbarBackIcon; private boolean isHomeSearchToolbarShow = false; + private ImageView mToolbarBackIcon; @Inject public ThemeColorUtils themeColorUtils; @Inject public ThemeUtils themeUtils; @@ -94,8 +94,8 @@ private void setupToolbar(boolean isHomeSearchToolbarShow, boolean showSortListB mHomeSearchToolbar = findViewById(R.id.home_toolbar); mMenuButton = findViewById(R.id.menu_button); mSearchText = findViewById(R.id.search_text); - mSwitchAccountButton = findViewById(R.id.switch_account_button); mToolbarBackIcon = findViewById(R.id.toolbar_back_icon); + mSwitchAccountButton = findViewById(R.id.switch_account_button); if (showSortListButtonGroup) { findViewById(R.id.sort_list_button_group).setVisibility(View.VISIBLE); diff --git a/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java b/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java index 5d42cf3e2c29..fd86c16dd19a 100644 --- a/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java @@ -106,6 +106,7 @@ import java.util.Locale; import java.util.Map; import java.util.TimeZone; +import java.util.concurrent.RejectedExecutionException; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -1022,4 +1023,5 @@ public static boolean isTablet() { public static boolean isLandscapeOrientation() { return MainApp.getAppContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE; } + } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 02c17068ca93..4abc259afaa6 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -111,12 +111,14 @@ Abbrechen Synchronisierung abbrechen Konto auswählen + Übernehmen Kopieren Löschen Fehler Nicht genügend Speicher Unbekannter Fehler Lade… + Weiter Nein OK Ausstehend @@ -129,8 +131,6 @@ Überspringen Konto wechseln Zu Konto wechseln - Weiter - Übernehmen Ja Testen Sie die Entwickler-Version Dies beinhaltet neue Funktionalitäten und ist nicht komplett qualitätsgesichert. Es können daher Fehler/Bugs auftreten, melden Sie uns solche bitte. @@ -922,6 +922,10 @@ E-Mail senden Speicherordner existiert nicht! Ursache könnte die Wiederherstellung einer Sicherungskopie auf einem anderen Gerät sein. Der Standard-Ordner wird jetzt wieder verwendet. Bitte überprüfen Sie die Einstellungen bezüglich des Speicherortes. + + Inhalte von %1$d Datei konnten nicht synchronisiert werden (Konflikte: %2$d) + Inhalte von %1$d Dateien konnten nicht synchronisiert werden (Konflikte: %2$d) + Nur lesen Kann Bearbeiten @@ -959,10 +963,6 @@ Expiration Date Noch keine Freigaben erstellt. - - Inhalte von %1$d Datei konnten nicht synchronisiert werden (Konflikte: %2$d) - Inhalte von %1$d Dateien konnten nicht synchronisiert werden (Konflikte: %2$d) - %1$d Datei im %2$s-Verzeichnis konnten nicht kopiert werden nach %1$d Dateien im %2$s-Verzeichnis konnten nicht kopiert werden nach diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 841176f74c2a..88a29668c4cd 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -25,18 +25,6 @@ #ff6F6F6F #A5A5A5 #222222 - @color/grey_30 - - - #FFFFFF - @color/grey_30 - @color/grey_0 - @color/grey_0 - @color/grey_0 - @color/grey_0 - @color/grey_60 - @color/grey_0 - #FFFFFF #ffffff @@ -46,11 +34,60 @@ #222222 #ffffff + + @color/appbar + #373535 + + #222222 + #DADADA + + #ffffff + #737373 + @color/white + + + #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 @@ -61,18 +98,20 @@ @color/grey_70 @color/grey_70 - - @color/appbar - #373535 - - #222222 - #DADADA - - #ffffff - #737373 - @color/white + + #FFFFFF + @color/grey_30 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_60 + @color/grey_0 + #FFFFFF - - #1E1E1E - @android:color/white + + #121212 + @color/grey_0 + @color/grey_80 + @color/grey_80 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 91174d9064e9..1ddf1a93ca08 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -32,35 +32,11 @@ #EEEEEE #00000000 #666666 - #77c4ff - #191919 #e53935 - - #191919 - @color/grey_30 - #191919 - #191919 - #191919 - #191919 - @color/grey_30 - #191919 - #000000 - #191919 - #F6E5EB - #C16F81 - #0D39DF - #757575 #222222 - #101010 - #F2F2F2 - #E5E5E5 - #B2B2B2 - #666666 - #4C4C4C - #333333 #EEEEEE #BDBDBD #666666 @@ -83,11 +59,6 @@ #ededed #000000 - - #FFFFFF - #191919 - #191919 - #ffffff #ffffff #000000 @@ -106,6 +77,62 @@ #616161 #80000000 + + @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 @@ -122,10 +149,27 @@ @color/grey_30 #CCCCCC - - @android:color/white - #666666 - #B3FFFFFF - #A5A5A5 + + #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/dimens.xml b/app/src/main/res/values/dimens.xml index d976f96e19d6..7c23544141a7 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -31,4 +31,4 @@ 145dp 1dp 13sp - + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 623e98aea174..bc4691698ce7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -126,8 +126,6 @@ Share Skip Copy - Confirm - Next About Remove account Remove account %s and delete all local files?\n\nDeletion cannot be undone. @@ -947,7 +945,6 @@ Link to folder Link to file Allow resharing - Read only Editing Allow upload and editing File drop (upload only) @@ -981,14 +978,8 @@ Data storage folder does not exist! This might be due to a backup restore on another device. Falling back to default. Please check settings to adjust data storage folder. Close - Login via direct link failed! - The link to your %1$s web interface when you open it in the browser. - Delayed due to too many wrong attempts - Create - Please select one template - Please choose a template and enter a file name. - Secure file drop + Read only Read only Can edit Filedrop only @@ -1025,6 +1016,15 @@ Received Shared + Login via direct link failed! + The link to your %1$s web interface when you open it in the browser. + Delayed due to too many wrong attempts + Create + Please select one template + Please choose a template and enter a file name. + Secure file drop + Next + Confirm Strict mode: no HTTP connection allowed! Destination filename Suggest