Skip to content

Commit cf00f77

Browse files
committed
Code refactoring.
1 parent 5e66b42 commit cf00f77

8 files changed

Lines changed: 165 additions & 10 deletions

File tree

app/src/main/java/com/owncloud/android/MainApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public static AppComponent getAppComponent() {
284284
@SuppressFBWarnings("ST")
285285
@Override
286286
public void onCreate() {
287-
//enableStrictMode();
287+
enableStrictMode();
288288

289289
viewThemeUtils = viewThemeUtilsProvider.get();
290290

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3-
43
<item android:color="@color/primary" android:state_enabled="true" />
54
<item android:color="@color/grey_30" />
6-
75
</selector>

app/src/main/res/values-de/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@
975975
<item quantity="one">%d ausgewählt</item>
976976
<item quantity="other">%d ausgewählt</item>
977977
</plurals>
978+
<!-- conflict dialog strings start -->
978979
<string name="conflict_replace">Ersetzen</string>
979980
<string name="conflict_replace_all">Alle ersetzen</string>
980981
<string name="conflict_keep_both">Beide behalten</string>
@@ -985,4 +986,5 @@
985986
<string name="conflict_dialog_title_multiple">%d Dateikonflikte</string>
986987
<string name="conflict_dialog_message">%1$s ist im Zielordner bereits vorhanden. Möchten Sie die bestehende Datei behalten oder überschreiben?</string>
987988
<string name="conflict_dialog_message_multiple">Die Dateien sind im Zielordner bereits vorhanden. Möchten Sie die bestehenden Dateien behalten oder überschreiben?</string>
989+
<!-- conflict dialog strings end -->
988990
</resources>

app/src/main/res/values-night/colors.xml

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<color name="bg_default">#121212</color>
3232
<color name="primary_button_text_color">#000000</color>
3333
<color name="grey_200">#818181</color>
34-
<color name="alert_txt_color">@color/grey_0</color>
3534
<color name="nc_grey">#222222</color>
3635
<color name="icon_on_nc_grey">#ffffff</color>
3736

@@ -49,4 +48,70 @@
4948
<!-- App bar -->
5049
<color name="appbar">#1E1E1E</color>
5150
<color name="fontAppbar">@android:color/white</color>
51+
52+
<!-- NMC Colors -->
53+
<color name="icon_color">#FFFFFF</color>
54+
<color name="sort_text_color">@color/grey_30</color>
55+
<color name="list_icon_color">@color/grey_30</color>
56+
<color name="warning_icon_color">#CCCCCC</color>
57+
<color name="divider_color">@color/grey_70</color>
58+
<color name="spinner_bg_color">@color/grey_80</color>
59+
<color name="refresh_layout_bg_color">#2D2D2D</color>
60+
<color name="primary_button_disabled_color">@color/grey_70</color>
61+
<color name="toolbar_divider_color">@color/grey_70</color>
62+
63+
<!-- Snackbar Colors -->
64+
<color name="snackbar_bg_color">@color/grey_80</color>
65+
<color name="snackbar_txt_color">@color/grey_0</color>
66+
67+
<!-- Alert Dialog Colors -->
68+
<color name="alert_bg_color">@color/grey_80</color>
69+
<color name="alert_txt_color">@color/grey_0</color>
70+
71+
<!-- NavigationView colors -->
72+
<color name="nav_selected_bg_color">@color/grey_60</color>
73+
<color name="nav_txt_unselected_color">@color/grey_0</color>
74+
<color name="nav_txt_selected_color">@color/grey_0</color>
75+
<color name="nav_icon_unselected_color">@color/grey_30</color>
76+
<color name="nav_icon_selected_color">#FFFFFF</color>
77+
<color name="nav_divider_color">@color/grey_30</color>
78+
<color name="nav_bg_color">@color/grey_80</color>
79+
<color name="drawer_quota_txt_color">#FFFFFF</color>
80+
81+
<!-- Bottom Sheet Colors -->
82+
<color name="bottom_sheet_bg_color">@color/grey_80</color>
83+
<color name="bottom_sheet_icon_color">@color/grey_30</color>
84+
<color name="bottom_sheet_txt_color">@color/grey_0</color>
85+
86+
<!-- Popup Menu Colors -->
87+
<color name="popup_menu_bg">@color/grey_80</color>
88+
<color name="popup_menu_txt_color">@color/grey_0</color>
89+
<color name="overflow_bg_color">@color/grey_80</color>
90+
91+
<!-- Switch Compat Colors -->
92+
<color name="switch_thumb_checked_disabled">@color/grey_70</color>
93+
<color name="switch_track_checked_disabled">@color/grey_60</color>
94+
<color name="switch_thumb_unchecked_disabled">@color/grey_70</color>
95+
<color name="switch_track_unchecked_disabled">@color/grey_60</color>
96+
97+
<!-- Checkbox Colors -->
98+
<color name="checkbox_checked_disabled">@color/grey_70</color>
99+
<color name="checkbox_unchecked_disabled">@color/grey_70</color>
100+
101+
<!-- Share Colors -->
102+
<color name="share_title_txt_color">#FFFFFF</color>
103+
<color name="share_subtitle_txt_color">@color/grey_30</color>
104+
<color name="share_info_txt_color">@color/grey_0</color>
105+
<color name="share_search_border_color">@color/grey_0</color>
106+
<color name="share_btn_txt_color">@color/grey_0</color>
107+
<color name="share_list_item_txt_color">@color/grey_0</color>
108+
<color name="share_disabled_txt_color">@color/grey_60</color>
109+
<color name="share_txt_color">@color/grey_0</color>
110+
<color name="share_et_divider">#FFFFFF</color>
111+
112+
<!-- Scan Colors -->
113+
<color name="scan_doc_bg_color">#121212</color>
114+
<color name="scan_text_color">@color/grey_0</color>
115+
<color name="scan_edit_bottom_color">@color/grey_80</color>
116+
<color name="scan_count_bg_color">@color/grey_80</color>
52117
</resources>

app/src/main/res/values/colors.xml

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
<color name="actionbar_shadow">#222222</color>
4040
<color name="grey_200">#EEEEEE</color>
4141
<color name="grey_400">#BDBDBD</color>
42-
<color name="grey_0">#F2F2F2</color>
4342
<color name="grey_600">#666666</color>
44-
<color name="grey_30">#B2B2B2</color>
4543

4644
<!-- standard material color definitions -->
4745

@@ -59,7 +57,6 @@
5957
<color name="secondary_button_background_color">#D6D7D7</color>
6058
<color name="secondary_button_text_color">#000000</color>
6159
<color name="nc_grey">#ededed</color>
62-
<color name="alert_txt_color">#191919</color>
6360
<color name="icon_on_nc_grey">#000000</color>
6461

6562
<color name="process_dialog_background">#ffffff</color>
@@ -84,4 +81,95 @@
8481
<color name="appbar">@android:color/white</color>
8582
<color name="fontAppbar">#666666</color>
8683
<color name="fontSecondaryAppbar">#A5A5A5</color>
84+
85+
<!-- NMC Colors -->
86+
<color name="icon_color">#191919</color>
87+
<color name="sort_text_color">@color/primary</color>
88+
<color name="list_icon_color">#191919</color>
89+
<color name="warning_icon_color">#191919</color>
90+
<color name="divider_color">@color/grey_30</color>
91+
<color name="spinner_bg_color">@android:color/white</color>
92+
<color name="refresh_layout_bg_color">#FFFFFF</color>
93+
<color name="primary_button_disabled_color">@color/grey_0</color>
94+
<color name="toolbar_divider_color">#CCCCCC</color>
95+
<color name="et_highlight_color">#77c4ff</color>
96+
<color name="white_trans_70">#B3FFFFFF</color>
97+
<color name="progress_bar_background">@color/grey_10</color>
98+
99+
<!-- Grey Colors -->
100+
<color name="dark_grey">#101010</color>
101+
<color name="grey_0">#F2F2F2</color>
102+
<color name="grey_10">#E5E5E5</color>
103+
<color name="grey_30">#B2B2B2</color>
104+
<color name="grey_60">#666666</color>
105+
<color name="grey_70">#4C4C4C</color>
106+
<color name="grey_80">#333333</color>
107+
108+
<!-- Snackbar Colors -->
109+
<color name="snackbar_bg_color">@color/design_snackbar_background_color</color>
110+
<color name="snackbar_txt_color">@color/white</color>
111+
112+
<!-- Alert Dialog Colors -->
113+
<color name="alert_bg_color">#FFFFFF</color>
114+
<color name="alert_txt_color">#191919</color>
115+
116+
<!-- NavigationView colors -->
117+
<color name="nav_selected_bg_color">@color/grey_0</color>
118+
<color name="nav_txt_unselected_color">#191919</color>
119+
<color name="nav_txt_selected_color">@color/primary</color>
120+
<color name="nav_icon_unselected_color">#191919</color>
121+
<color name="nav_icon_selected_color">@color/primary</color>
122+
<color name="nav_divider_color">@color/grey_30</color>
123+
<color name="nav_bg_color">@color/white</color>
124+
<color name="drawer_quota_txt_color">#191919</color>
125+
126+
<!-- Bottom Sheet Colors -->
127+
<color name="bottom_sheet_bg_color">#FFFFFF</color>
128+
<color name="bottom_sheet_icon_color">#191919</color>
129+
<color name="bottom_sheet_txt_color">#191919</color>
130+
131+
<!-- Popup Menu Colors -->
132+
<color name="popup_menu_bg">#FFFFFF</color>
133+
<color name="popup_menu_txt_color">#191919</color>
134+
<color name="overflow_bg_color">#FFFFFF</color>
135+
136+
<!-- Switch Compat Colors -->
137+
<color name="switch_thumb_checked_enabled">@color/primary</color>
138+
<color name="switch_track_checked_enabled">#F399C7</color>
139+
<color name="switch_thumb_checked_disabled">@color/grey_0</color>
140+
<color name="switch_track_checked_disabled">@color/grey_0</color>
141+
<color name="switch_thumb_unchecked_enabled">#FFFFFF</color>
142+
<color name="switch_track_unchecked_enabled">@color/grey_30</color>
143+
<color name="switch_thumb_unchecked_disabled">@color/grey_0</color>
144+
<color name="switch_track_unchecked_disabled">@color/grey_0</color>
145+
146+
<!-- Checkbox Colors -->
147+
<color name="checkbox_checked_enabled">@color/primary</color>
148+
<color name="checkbox_unchecked_enabled">@color/grey_30</color>
149+
<color name="checkbox_checked_disabled">@color/grey_30</color>
150+
<color name="checkbox_unchecked_disabled">#CCCCCC</color>
151+
152+
<!-- Share Colors -->
153+
<color name="share_title_txt_color">#191919</color>
154+
<color name="share_subtitle_txt_color">@color/grey_30</color>
155+
<color name="share_info_txt_color">#191919</color>
156+
<color name="share_search_border_color">#191919</color>
157+
<color name="share_btn_txt_color">#191919</color>
158+
<color name="share_list_item_txt_color">#191919</color>
159+
<color name="share_disabled_txt_color">@color/grey_30</color>
160+
<color name="share_txt_color">#191919</color>
161+
<color name="share_et_divider">#000000</color>
162+
<color name="share_warning_txt_color">#191919</color>
163+
<color name="sharing_warning_bg_color">#F6E5EB</color>
164+
<color name="sharing_warning_border_color">#C16F81</color>
165+
<color name="share_color">#0D39DF</color>
166+
<color name="shared_with_me_color">#0099ff</color>
167+
168+
<!-- Scan Colors -->
169+
<color name="scan_doc_bg_color">@color/grey_0</color>
170+
<color name="scan_text_color">#191919</color>
171+
<color name="scan_edit_bottom_color">@color/grey_0</color>
172+
<color name="scan_count_bg_color">@color/grey_30</color>
173+
<color name="neptune">#77b6bb</color>
174+
<color name="neptune_50">#5077b6bb</color>
87175
</resources>

app/src/main/res/values/dimens.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
<dimen name="notification_row_item_height">145dp</dimen>
3232
<dimen name="button_stroke_width">1dp</dimen>
3333
<dimen name="txt_size_13sp">13sp</dimen>
34-
</resources>
34+
</resources>

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@
10781078
<string name="document_scan_export_dialog_images">Multiple images</string>
10791079
<string name="download_cannot_create_file">Cannot create local file</string>
10801080
<string name="download_download_invalid_local_file_name">Invalid filename for local file</string>
1081+
<!-- conflict dialog strings start -->
10811082
<string name="conflict_replace">Replace</string>
10821083
<string name="conflict_replace_all">Replace all</string>
10831084
<string name="conflict_keep_both">Keep both</string>
@@ -1089,6 +1090,7 @@
10891090
<string name="conflict_dialog_message">%1$s already exists in this location. Do you want to replace it with the
10901091
file you are moving?</string>
10911092
<string name="conflict_dialog_message_multiple">The files already exist in this location. Do you want to replace them with the files you are moving?</string>
1093+
<!-- conflict dialog strings end -->
10921094
<string name="drawer_item_groupfolders">Groupfolders</string>
10931095
<string name="tags_more" translatable="false">+%1$d</string>
10941096
</resources>

app/src/main/res/values/styles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,11 @@
486486
<item name="android:textColor">@color/white</item>
487487
</style>
488488

489-
<style name="PositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
489+
<style name="PositiveButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
490490
<item name="android:textColor">@color/dialog_positive_btn_color</item>
491491
</style>
492492

493-
<style name="NegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
493+
<style name="NegativeButtonStyle" parent="Widget.Material3.Button.TextButton.Dialog">
494494
<item name="android:textColor">@color/alert_txt_color</item>
495495
</style>
496496

0 commit comments

Comments
 (0)