Skip to content

Commit

Permalink
Code refactored.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed May 17, 2023
1 parent 688d6b0 commit eb94e28
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1022,4 +1023,5 @@ public static boolean isTablet() {
public static boolean isLandscapeOrientation() {
return MainApp.getAppContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
}

}
12 changes: 6 additions & 6 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,14 @@
<string name="common_cancel">Abbrechen</string>
<string name="common_cancel_sync">Synchronisierung abbrechen</string>
<string name="common_choose_account">Konto auswählen</string>
<string name="common_confirm">Übernehmen</string>
<string name="common_copy">Kopieren</string>
<string name="common_delete">Löschen</string>
<string name="common_error">Fehler</string>
<string name="common_error_out_memory">Nicht genügend Speicher</string>
<string name="common_error_unknown">Unbekannter Fehler</string>
<string name="common_loading">Lade…</string>
<string name="common_next">Weiter</string>
<string name="common_no">Nein</string>
<string name="common_ok">OK</string>
<string name="common_pending">Ausstehend</string>
Expand All @@ -129,8 +131,6 @@
<string name="common_skip">Überspringen</string>
<string name="common_switch_account">Konto wechseln</string>
<string name="common_switch_to_account">Zu Konto wechseln</string>
<string name="common_next">Weiter</string>
<string name="common_confirm">Übernehmen</string>
<string name="common_yes">Ja</string>
<string name="community_beta_headline">Testen Sie die Entwickler-Version</string>
<string name="community_beta_text">Dies beinhaltet neue Funktionalitäten und ist nicht komplett qualitätsgesichert. Es können daher Fehler/Bugs auftreten, melden Sie uns solche bitte.</string>
Expand Down Expand Up @@ -922,6 +922,10 @@
<string name="write_email">E-Mail senden</string>
<string name="wrong_storage_path">Speicherordner existiert nicht!</string>
<string name="wrong_storage_path_desc">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.</string>
<plurals name="sync_fail_in_favourites_content">
<item quantity="one">Inhalte von %1$d Datei konnten nicht synchronisiert werden (Konflikte: %2$d)</item>
<item quantity="other">Inhalte von %1$d Dateien konnten nicht synchronisiert werden (Konflikte: %2$d)</item>
</plurals>
<!-- sharing related strings start -->
<string name="share_permission_read_only">Nur lesen</string>
<string name="share_permission_can_edit">Kann Bearbeiten</string>
Expand Down Expand Up @@ -959,10 +963,6 @@
<string name="expiration_date">Expiration Date</string>
<string name="empty_shares">Noch keine Freigaben erstellt.</string>
<!-- sharing related strings end -->
<plurals name="sync_fail_in_favourites_content">
<item quantity="one">Inhalte von %1$d Datei konnten nicht synchronisiert werden (Konflikte: %2$d)</item>
<item quantity="other">Inhalte von %1$d Dateien konnten nicht synchronisiert werden (Konflikte: %2$d)</item>
</plurals>
<plurals name="sync_foreign_files_forgotten_content">
<item quantity="one">%1$d Datei im %2$s-Verzeichnis konnten nicht kopiert werden nach </item>
<item quantity="other">%1$d Dateien im %2$s-Verzeichnis konnten nicht kopiert werden nach </item>
Expand Down
89 changes: 64 additions & 25 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@
<color name="disabled_text">#ff6F6F6F</color>
<color name="secondary_text_color">#A5A5A5</color>
<color name="list_divider_background">#222222</color>
<color name="list_icon_color">@color/grey_30</color>

<!-- Share Colors -->
<color name="share_title_txt_color">#FFFFFF</color>
<color name="share_subtitle_txt_color">@color/grey_30</color>
<color name="share_info_txt_color">@color/grey_0</color>
<color name="share_search_border_color">@color/grey_0</color>
<color name="share_btn_txt_color">@color/grey_0</color>
<color name="share_list_item_txt_color">@color/grey_0</color>
<color name="share_disabled_txt_color">@color/grey_60</color>
<color name="share_txt_color">@color/grey_0</color>
<color name="share_et_divider">#FFFFFF</color>

<!-- Colors -->
<color name="dark">#ffffff</color>
Expand All @@ -46,11 +34,60 @@
<color name="nc_grey">#222222</color>
<color name="icon_on_nc_grey">#ffffff</color>

<!-- Multiselect backgrounds -->
<color name="action_mode_background">@color/appbar</color>
<color name="selected_item_background">#373535</color>

<color name="filelist_icon_background">#222222</color>
<color name="standard_grey">#DADADA</color>

<color name="drawer_menu_icon">#ffffff</color>
<color name="bg_fallback_highlight">#737373</color>
<color name="drawer_active_item_background">@color/white</color>

<!-- App bar -->
<color name="appbar">#1E1E1E</color>
<color name="fontAppbar">@android:color/white</color>

<!-- NMC Colors -->
<color name="icon_color">#FFFFFF</color>
<color name="sort_text_color">@color/grey_30</color>
<color name="list_icon_color">@color/grey_30</color>
<color name="warning_icon_color">#CCCCCC</color>
<color name="divider_color">@color/grey_70</color>
<color name="spinner_bg_color">@color/grey_80</color>
<color name="refresh_layout_bg_color">#2D2D2D</color>
<color name="primary_button_disabled_color">@color/grey_70</color>
<color name="toolbar_divider_color">@color/grey_70</color>

<!-- Snackbar Colors -->
<color name="snackbar_bg_color">@color/grey_80</color>
<color name="snackbar_txt_color">@color/grey_0</color>

<!-- Alert Dialog Colors -->
<color name="alert_bg_color">@color/grey_80</color>
<color name="alert_txt_color">@color/grey_0</color>

<!-- NavigationView colors -->
<color name="nav_selected_bg_color">@color/grey_60</color>
<color name="nav_txt_unselected_color">@color/grey_0</color>
<color name="nav_txt_selected_color">@color/grey_0</color>
<color name="nav_icon_unselected_color">@color/grey_30</color>
<color name="nav_icon_selected_color">#FFFFFF</color>
<color name="nav_divider_color">@color/grey_30</color>
<color name="nav_bg_color">@color/grey_80</color>
<color name="drawer_quota_txt_color">#FFFFFF</color>

<!-- Bottom Sheet Colors -->
<color name="bottom_sheet_bg_color">@color/grey_80</color>
<color name="bottom_sheet_icon_color">@color/grey_30</color>
<color name="bottom_sheet_txt_color">@color/grey_0</color>

<!-- Popup Menu Colors -->
<color name="popup_menu_bg">@color/grey_80</color>
<color name="popup_menu_txt_color">@color/grey_0</color>
<color name="overflow_bg_color">@color/grey_80</color>

<!-- Switch Compat Colors -->
<color name="switch_thumb_checked_disabled">@color/grey_70</color>
<color name="switch_track_checked_disabled">@color/grey_60</color>
Expand All @@ -61,18 +98,20 @@
<color name="checkbox_checked_disabled">@color/grey_70</color>
<color name="checkbox_unchecked_disabled">@color/grey_70</color>

<!-- Multiselect backgrounds -->
<color name="action_mode_background">@color/appbar</color>
<color name="selected_item_background">#373535</color>

<color name="filelist_icon_background">#222222</color>
<color name="standard_grey">#DADADA</color>

<color name="drawer_menu_icon">#ffffff</color>
<color name="bg_fallback_highlight">#737373</color>
<color name="drawer_active_item_background">@color/white</color>
<!-- Share Colors -->
<color name="share_title_txt_color">#FFFFFF</color>
<color name="share_subtitle_txt_color">@color/grey_30</color>
<color name="share_info_txt_color">@color/grey_0</color>
<color name="share_search_border_color">@color/grey_0</color>
<color name="share_btn_txt_color">@color/grey_0</color>
<color name="share_list_item_txt_color">@color/grey_0</color>
<color name="share_disabled_txt_color">@color/grey_60</color>
<color name="share_txt_color">@color/grey_0</color>
<color name="share_et_divider">#FFFFFF</color>

<!-- App bar -->
<color name="appbar">#1E1E1E</color>
<color name="fontAppbar">@android:color/white</color>
<!-- Scan Colors -->
<color name="scan_doc_bg_color">#121212</color>
<color name="scan_text_color">@color/grey_0</color>
<color name="scan_edit_bottom_color">@color/grey_80</color>
<color name="scan_count_bg_color">@color/grey_80</color>
</resources>
112 changes: 78 additions & 34 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,11 @@
<color name="dark_background_text_color">#EEEEEE</color>
<color name="transparent">#00000000</color>
<color name="secondary_text_color">#666666</color>
<color name="search_et_highlight_color">#77c4ff</color>
<color name="list_icon_color">#191919</color>
<color name="highlight_textColor_Warning">#e53935</color>

<!-- Share Colors -->
<color name="share_title_txt_color">#191919</color>
<color name="share_subtitle_txt_color">@color/grey_30</color>
<color name="share_info_txt_color">#191919</color>
<color name="share_search_border_color">#191919</color>
<color name="share_btn_txt_color">#191919</color>
<color name="share_list_item_txt_color">#191919</color>
<color name="share_disabled_txt_color">@color/grey_30</color>
<color name="share_txt_color">#191919</color>
<color name="share_et_divider">#000000</color>
<color name="share_warning_txt_color">#191919</color>
<color name="sharing_warning_bg_color">#F6E5EB</color>
<color name="sharing_warning_border_color">#C16F81</color>
<color name="share_color">#0D39DF</color>

<!-- Colors -->
<color name="standard_grey">#757575</color>
<color name="actionbar_shadow">#222222</color>
<color name="dark_grey">#101010</color>
<color name="grey_0">#F2F2F2</color>
<color name="grey_10">#E5E5E5</color>
<color name="grey_30">#B2B2B2</color>
<color name="grey_60">#666666</color>
<color name="grey_70">#4C4C4C</color>
<color name="grey_80">#333333</color>
<color name="grey_200">#EEEEEE</color>
<color name="grey_400">#BDBDBD</color>
<color name="grey_600">#666666</color>
Expand All @@ -83,11 +59,6 @@
<color name="nc_grey">#ededed</color>
<color name="icon_on_nc_grey">#000000</color>

<!-- Bottom Sheet Colors -->
<color name="bottom_sheet_bg_color">#FFFFFF</color>
<color name="bottom_sheet_icon_color">#191919</color>
<color name="bottom_sheet_txt_color">#191919</color>

<color name="process_dialog_background">#ffffff</color>
<color name="indicator_dot_selected">#ffffff</color>
<color name="drawer_shadow">#000000</color>
Expand All @@ -106,6 +77,62 @@
<color name="bg_fallback_highlight">#616161</color>
<color name="drawer_active_item_background">#80000000</color>

<!-- App bar -->
<color name="appbar">@android:color/white</color>
<color name="fontAppbar">#666666</color>
<color name="fontSecondaryAppbar">#A5A5A5</color>

<!-- NMC Colors -->
<color name="icon_color">#191919</color>
<color name="sort_text_color">@color/primary</color>
<color name="list_icon_color">#191919</color>
<color name="warning_icon_color">#191919</color>
<color name="divider_color">@color/grey_30</color>
<color name="spinner_bg_color">@android:color/white</color>
<color name="refresh_layout_bg_color">#FFFFFF</color>
<color name="primary_button_disabled_color">@color/grey_0</color>
<color name="toolbar_divider_color">#CCCCCC</color>
<color name="et_highlight_color">#77c4ff</color>
<color name="white_trans_70">#B3FFFFFF</color>
<color name="progress_bar_background">@color/grey_10</color>

<!-- Grey Colors -->
<color name="dark_grey">#101010</color>
<color name="grey_0">#F2F2F2</color>
<color name="grey_10">#E5E5E5</color>
<color name="grey_30">#B2B2B2</color>
<color name="grey_60">#666666</color>
<color name="grey_70">#4C4C4C</color>
<color name="grey_80">#333333</color>

<!-- Snackbar Colors -->
<color name="snackbar_bg_color">@color/design_snackbar_background_color</color>
<color name="snackbar_txt_color">@color/white</color>

<!-- Alert Dialog Colors -->
<color name="alert_bg_color">#FFFFFF</color>
<color name="alert_txt_color">#191919</color>

<!-- NavigationView colors -->
<color name="nav_selected_bg_color">@color/grey_0</color>
<color name="nav_txt_unselected_color">#191919</color>
<color name="nav_txt_selected_color">@color/primary</color>
<color name="nav_icon_unselected_color">#191919</color>
<color name="nav_icon_selected_color">@color/primary</color>
<color name="nav_divider_color">@color/grey_30</color>
<color name="nav_bg_color">@color/white</color>
<color name="drawer_quota_txt_color">#191919</color>

<!-- Bottom Sheet Colors -->
<color name="bottom_sheet_bg_color">#FFFFFF</color>
<color name="bottom_sheet_icon_color">#191919</color>
<color name="bottom_sheet_txt_color">#191919</color>

<!-- Popup Menu Colors -->
<color name="popup_menu_bg">#FFFFFF</color>
<color name="popup_menu_txt_color">#191919</color>
<color name="overflow_bg_color">#FFFFFF</color>

<!-- Switch Compat Colors -->
<color name="switch_thumb_checked_enabled">@color/primary</color>
<color name="switch_track_checked_enabled">#F399C7</color>
Expand All @@ -122,10 +149,27 @@
<color name="checkbox_checked_disabled">@color/grey_30</color>
<color name="checkbox_unchecked_disabled">#CCCCCC</color>

<!-- App bar -->
<color name="appbar">@android:color/white</color>
<color name="fontAppbar">#666666</color>
<color name="white_trans_70">#B3FFFFFF</color>
<color name="fontSecondaryAppbar">#A5A5A5</color>
<!-- Share Colors -->
<color name="share_title_txt_color">#191919</color>
<color name="share_subtitle_txt_color">@color/grey_30</color>
<color name="share_info_txt_color">#191919</color>
<color name="share_search_border_color">#191919</color>
<color name="share_btn_txt_color">#191919</color>
<color name="share_list_item_txt_color">#191919</color>
<color name="share_disabled_txt_color">@color/grey_30</color>
<color name="share_txt_color">#191919</color>
<color name="share_et_divider">#000000</color>
<color name="share_warning_txt_color">#191919</color>
<color name="sharing_warning_bg_color">#F6E5EB</color>
<color name="sharing_warning_border_color">#C16F81</color>
<color name="share_color">#0D39DF</color>
<color name="shared_with_me_color">#0099ff</color>

<!-- Scan Colors -->
<color name="scan_doc_bg_color">@color/grey_0</color>
<color name="scan_text_color">#191919</color>
<color name="scan_edit_bottom_color">@color/grey_0</color>
<color name="scan_count_bg_color">@color/grey_30</color>
<color name="neptune">#77b6bb</color>
<color name="neptune_50">#5077b6bb</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
<dimen name="notification_row_item_height">145dp</dimen>
<dimen name="button_stroke_width">1dp</dimen>
<dimen name="txt_size_13sp">13sp</dimen>
</resources>
</resources>
Loading

0 comments on commit eb94e28

Please sign in to comment.