mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
Merge pull request #3967 from timrae/notification-color
Add color to notifications and make content public
This commit is contained in:
commit
b34b2079f9
@ -483,7 +483,9 @@ public class AnkiActivity extends AppCompatActivity implements LoaderManager.Loa
|
||||
.setSmallIcon(R.drawable.ic_stat_notify)
|
||||
.setContentTitle(title)
|
||||
.setContentText(message)
|
||||
.setColor(getResources().getColor(R.color.theme_primary))
|
||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
||||
.setTicker(ticker);
|
||||
// Enable vibrate and blink if set in preferences
|
||||
if (prefs.getBoolean("widgetVibrate", false)) {
|
||||
|
@ -62,6 +62,7 @@ public class NotificationService extends Service {
|
||||
String cardsDueText = getString(R.string.widget_minimum_cards_due_notification_ticker_text, dueCardsCount);
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
|
||||
.setSmallIcon(R.drawable.ic_stat_notify)
|
||||
.setColor(getResources().getColor(R.color.theme_primary_dark))
|
||||
.setContentTitle(cardsDueText)
|
||||
.setTicker(cardsDueText);
|
||||
// Enable vibrate and blink if set in preferences
|
||||
|
Loading…
Reference in New Issue
Block a user