0
0
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:
Tim Rae 2015-12-08 12:44:32 +09:00
commit b34b2079f9
2 changed files with 3 additions and 0 deletions

View File

@ -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)) {

View File

@ -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