mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge pull request #2110 from ShridharGoel/issue2107
Fix #2107 by changing notification text colour to white in night mode
This commit is contained in:
commit
6754ce121c
1 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package fr.free.nrw.commons.notification;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
|
|
@ -77,7 +78,13 @@ public class NotificationRenderer extends Renderer<Notification> {
|
|||
public void updateDrawState(TextPaint ds) {
|
||||
super.updateDrawState(ds);
|
||||
ds.setUnderlineText(false);
|
||||
ds.setColor(Color.BLACK);
|
||||
|
||||
if(PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("theme", false)) {
|
||||
ds.setColor(Color.WHITE);
|
||||
}
|
||||
else {
|
||||
ds.setColor(Color.BLACK);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue