From 7c539ee47715c3e5d505358227d3a53382829dfd Mon Sep 17 00:00:00 2001 From: Juan Miguel Boyero Corral Date: Tue, 22 Nov 2011 22:22:29 +0000 Subject: [PATCH] Added assignment, survey and unknown notifications git-svn-id: https://forja.rediris.es/svn/cusl6-swadroid/trunk@162 5bc14d19-1e4b-4ba2-aa50-860af135f48c --- .../swadroid/modules/notifications/Notifications.java | 1 - .../notifications/NotificationsCursorAdapter.java | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java index 7043f785..d4782f03 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/Notifications.java @@ -133,7 +133,6 @@ public class Notifications extends Module { updateButton = (ImageButton)this.findViewById(R.id.refresh); updateButton.setVisibility(View.VISIBLE); - //dbHelper.emptyTable(Global.DB_TABLE_NOTIFICATIONS); dbCursor = dbHelper.getDb().getCursor(Global.DB_TABLE_NOTIFICATIONS, selection, orderby); adapter = new NotificationsCursorAdapter(this, dbCursor); diff --git a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/NotificationsCursorAdapter.java b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/NotificationsCursorAdapter.java index b4b45956..6499c2ad 100644 --- a/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/NotificationsCursorAdapter.java +++ b/SWADroid/src/es/ugr/swad/swadroid/modules/notifications/NotificationsCursorAdapter.java @@ -87,6 +87,17 @@ public class NotificationsCursorAdapter extends CursorAdapter { { type = context.getString(R.string.forumReply); notificationIcon.setImageResource(R.drawable.forum); + } else if(type.equals("assignment")) + { + type = context.getString(R.string.assignment); + notificationIcon.setImageResource(R.drawable.ic_launcher_swadroid); + } else if(type.equals("survey")) + { + type = context.getString(R.string.survey); + notificationIcon.setImageResource(R.drawable.ic_launcher_swadroid); + } else { + type = context.getString(R.string.unknownNotification); + notificationIcon.setImageResource(R.drawable.ic_launcher_swadroid); } eventType.setText(type);