From 2ccb538fbcd6699efc7b48976c560481abd02dd0 Mon Sep 17 00:00:00 2001 From: nikhilchowdary Date: Mon, 27 Feb 2017 01:12:59 +0530 Subject: [PATCH] Fixes #437 --- .../toolkit/adapter/DraftProjectAdapter.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source-code/app/src/main/java/org/buildmlearn/toolkit/adapter/DraftProjectAdapter.java b/source-code/app/src/main/java/org/buildmlearn/toolkit/adapter/DraftProjectAdapter.java index eb67c8cb..89ffe5da 100644 --- a/source-code/app/src/main/java/org/buildmlearn/toolkit/adapter/DraftProjectAdapter.java +++ b/source-code/app/src/main/java/org/buildmlearn/toolkit/adapter/DraftProjectAdapter.java @@ -2,6 +2,7 @@ import android.content.Context; import android.support.v4.content.ContextCompat; + import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -117,7 +118,25 @@ public View getView(int position, View convertView, ViewGroup parent) { SavedProject projectData = getItem(position); holder.draftSubtitle.setText(String.format(Locale.ENGLISH, "Last Modified: %s", projectData.getTime())); holder.draftTitle.setText(String.format(Locale.ENGLISH, "Drafted on %s", projectData.getDate())); - holder.draftIcon.setText("D"); + + + if("InfoTemplate".equals(projectData.getType())) + holder.draftIcon.setText("I"); + else if("SpellingTemplate".equals(projectData.getType())) + holder.draftIcon.setText("S"); + else if("QuizTemplate".equals(projectData.getType())) + holder.draftIcon.setText("Q"); + else if("FlashCardsTemplate".equals(projectData.getType())) + holder.draftIcon.setText("F"); + else if("VideoCollectionTemplate".equals(projectData.getType())) + holder.draftIcon.setText("V"); + else if("ComprehensionTemplate".equals(projectData.getType())) + holder.draftIcon.setText("C"); + else if("DictationTemplate".equals(projectData.getType())) + holder.draftIcon.setText("D"); + else if("MatchTemplate".equals(projectData.getType())) + holder.draftIcon.setText("M"); + convertView.setTag(holder); if (projectData.isSelected()) {