File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
app/src/main/java/fr/gaulupeau/apps/Poche/ui Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 2828import android .view .Menu ;
2929import android .view .MenuItem ;
3030import android .view .View ;
31+ import android .widget .ImageView ;
3132import android .widget .ProgressBar ;
3233import android .widget .TextView ;
3334import android .widget .Toast ;
@@ -134,6 +135,12 @@ protected void onCreate(Bundle savedInstanceState) {
134135 lastUpdateTimeView = (TextView )headerView .findViewById (R .id .lastUpdateTime );
135136 }
136137
138+ // Set white logo in the navigation bar in dark and dark (high contrast) theme
139+ if (headerView != null && Themes .getCurrentTheme () != null && Themes .getCurrentTheme ().isDark ()) {
140+ ImageView logo = headerView .findViewById (R .id .imageView );
141+ logo .setImageDrawable (getDrawable (R .drawable .welcome_white ));
142+ }
143+
137144 // Set different colors for items in the navigation bar in dark (high contrast) theme
138145 if (Themes .getCurrentTheme () != null && Themes .getCurrentTheme () == Themes .Theme .DARK_CONTRAST ) {
139146 @ SuppressLint ("ResourceType" ) XmlResourceParser parser = getResources ().getXml (R .color .dark_contrast_menu_item );
Original file line number Diff line number Diff line change @@ -119,6 +119,10 @@ public enum Theme {
119119 return proxyResId ;
120120 }
121121
122+ public boolean isDark () {
123+ return this == Themes .Theme .DARK || this == Themes .Theme .DARK_CONTRAST ;
124+ }
125+
122126 }
123127
124128}
You can’t perform that action at this time.
0 commit comments