From cceda35df7fb7de172936fa5f85cca1fcce1b071 Mon Sep 17 00:00:00 2001 From: Edric Chan Date: Sat, 31 Mar 2018 18:03:22 +0800 Subject: [PATCH] feat(shared-helper): add more strings for actions --- .../com/edricchan/studybuddy/SharedHelper.java | 15 +++++++++++++-- .../studybuddy/interfaces/NotificationAction.java | 14 +++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/edricchan/studybuddy/SharedHelper.java b/app/src/main/java/com/edricchan/studybuddy/SharedHelper.java index ee469ab3f..e3b172017 100644 --- a/app/src/main/java/com/edricchan/studybuddy/SharedHelper.java +++ b/app/src/main/java/com/edricchan/studybuddy/SharedHelper.java @@ -16,7 +16,18 @@ public class SharedHelper { * Intent for notification settings action button for notifications */ public static final String ACTION_NOTIFICATIONS_SETTINGS = "com.edricchan.studybuddy.intent.ACTION_NOTIFICATIONS_SETTINGS"; - + /** + * Action icon for settings + */ + public static final String ACTION_SETTINGS_ICON = "settings"; + /** + * Action icon for notification + */ + public static final String ACTION_NOTIFICATION_ICON = "notification"; + /** + * Action icon for mark as done + */ + public static final String ACTION_MARK_AS_DONE_ICON = "mark_as_done"; private Context mContext; public SharedHelper(Context context) { @@ -30,7 +41,7 @@ public SharedHelper(Context context) { */ private List addDefaultNotificationActions() { List notificationActionList = new ArrayList<>(); - notificationActionList.add(new NotificationAction("Configure notifications", ACTION_NOTIFICATIONS_SETTINGS)); + notificationActionList.add(new NotificationAction("settings", "Configure notifications", ACTION_NOTIFICATIONS_SETTINGS)); return notificationActionList; } diff --git a/app/src/main/java/com/edricchan/studybuddy/interfaces/NotificationAction.java b/app/src/main/java/com/edricchan/studybuddy/interfaces/NotificationAction.java index f45831e60..bc093b81d 100644 --- a/app/src/main/java/com/edricchan/studybuddy/interfaces/NotificationAction.java +++ b/app/src/main/java/com/edricchan/studybuddy/interfaces/NotificationAction.java @@ -3,13 +3,25 @@ public class NotificationAction { private String mAction; private String mActionType; - public NotificationAction(String action, String actionType) { + private String mActionIcon; + + public NotificationAction() { + + } + public NotificationAction(String action, String actionType, String actionIcon) { this.mAction = action; this.mActionType = actionType; + this.mActionIcon = actionIcon; } + public String getAction() { return this.mAction; } + + public String getActionIcon() { + return this.mActionIcon; + } + public String getActionType() { return this.mActionType; }