|
2 | 2 |
|
3 | 3 | import android.content.Context; |
4 | 4 | import android.support.v4.content.ContextCompat; |
| 5 | +import android.util.Log; |
5 | 6 | import android.view.LayoutInflater; |
6 | 7 | import android.view.View; |
7 | 8 | import android.view.ViewGroup; |
@@ -117,7 +118,25 @@ public View getView(int position, View convertView, ViewGroup parent) { |
117 | 118 | SavedProject projectData = getItem(position); |
118 | 119 | holder.draftSubtitle.setText(String.format(Locale.ENGLISH, "Last Modified: %s", projectData.getTime())); |
119 | 120 | holder.draftTitle.setText(String.format(Locale.ENGLISH, "Drafted on %s", projectData.getDate())); |
120 | | - holder.draftIcon.setText("D"); |
| 121 | + |
| 122 | + |
| 123 | + if("InfoTemplate".equals(projectData.getType())) |
| 124 | + holder.draftIcon.setText("I"); |
| 125 | + else if("SpellingTemplate".equals(projectData.getType())) |
| 126 | + holder.draftIcon.setText("S"); |
| 127 | + else if("QuizTemplate".equals(projectData.getType())) |
| 128 | + holder.draftIcon.setText("Q"); |
| 129 | + else if("FlashCardsTemplate".equals(projectData.getType())) |
| 130 | + holder.draftIcon.setText("F"); |
| 131 | + else if("VideoCollectionTemplate".equals(projectData.getType())) |
| 132 | + holder.draftIcon.setText("V"); |
| 133 | + else if("ComprehensionTemplate".equals(projectData.getType())) |
| 134 | + holder.draftIcon.setText("C"); |
| 135 | + else if("DictationTemplate".equals(projectData.getType())) |
| 136 | + holder.draftIcon.setText("D"); |
| 137 | + else if("MatchTemplate".equals(projectData.getType())) |
| 138 | + holder.draftIcon.setText("M"); |
| 139 | + |
121 | 140 | convertView.setTag(holder); |
122 | 141 | if (projectData.isSelected()) |
123 | 142 | { |
|
0 commit comments