Added assignment, survey and unknown notifications

git-svn-id: https://forja.rediris.es/svn/cusl6-swadroid/trunk@162 5bc14d19-1e4b-4ba2-aa50-860af135f48c
This commit is contained in:
Juan Miguel Boyero Corral 2011-11-22 22:22:29 +00:00
parent 092c795cf7
commit 7c539ee477
2 changed files with 11 additions and 1 deletions

View File

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

View File

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