diff --git a/res/layout-large-land/use_prepared_questions_item.xml b/res/layout-large-land/use_prepared_questions_item.xml index aada86f..19c9d15 100644 --- a/res/layout-large-land/use_prepared_questions_item.xml +++ b/res/layout-large-land/use_prepared_questions_item.xml @@ -1,7 +1,6 @@ - + + + + + + + + + + android:layout_marginLeft="1dip" + android:layout_marginRight="3dip" + android:textColor="@color/black" /> - + android:layout_marginLeft="1dip" + android:layout_marginRight="3dip" + android:textColor="@color/black" /> + - - + android:layout_marginRight="4dip" + android:textColor="@color/black" /> + + diff --git a/res/values/strings.xml b/res/values/strings.xml index efb1d48..1ab0fed 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -2,12 +2,27 @@ Logo - + , + [ + ] + ( + ) SMILE Teacher Smileplug IP Connect - Loading... + Loading… Confirm Deletion + + Connection established + Creating session… + Starting… + Solving… + Sorting… + Recovering… + Retaking… + Smileplug is down or unavailable + Information about teacher\'s session Teacher name Session title @@ -55,7 +70,7 @@ called the SMILE Teacher, serves to manage and save data from the activity via an ad-hoc network. It is a Graphic User Interface-based application that can be - launched on an Android tablet in conjuction with a the Server + launched on an Android tablet in conjunction with a the Server running on a PlugComputer. The application allows the teacher to facilitate inquiry-based learning in a collaborative environment It also allows the teacher to save the @@ -77,15 +92,6 @@ QUESTION Students - - Connection established - Creating session... - Starting... - Solving... - Sorting... - Recovering... - Retaking... - Smileplug is down or unavailable Question Number Correct Answer diff --git a/src/main/java/org/smilec/smile/domain/IQSet.java b/src/main/java/org/smilec/smile/domain/IQSet.java index fea04eb..9ccf1a4 100644 --- a/src/main/java/org/smilec/smile/domain/IQSet.java +++ b/src/main/java/org/smilec/smile/domain/IQSet.java @@ -1,5 +1,13 @@ package org.smilec.smile.domain; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + + + public class IQSet { private String id; @@ -26,6 +34,25 @@ public void setId(String id) { this.id = id; } + public String getDate() { + + DateFormat formatDecrypt = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); + DateFormat formatDesired = new SimpleDateFormat("MMM dd, yyyy", Locale.ENGLISH); + + // key example: 2013-12-25T07:20:45.656Z + String date_s = key.substring(0, Math.min(key.length(), 10)); + + Date date = null; + + try + { date = formatDecrypt.parse(date_s); } + catch (ParseException e) + { e.printStackTrace(); } + + System.out.println(date); + + return formatDesired.format(date); + } public String getKey() { return key; } diff --git a/src/main/java/org/smilec/smile/ui/adapter/IQSetListAdapter.java b/src/main/java/org/smilec/smile/ui/adapter/IQSetListAdapter.java index 1f20cfd..ee1f3c3 100644 --- a/src/main/java/org/smilec/smile/ui/adapter/IQSetListAdapter.java +++ b/src/main/java/org/smilec/smile/ui/adapter/IQSetListAdapter.java @@ -53,10 +53,10 @@ public View getView(int position, View convertView, ViewGroup parent) { tvGroupName.setText(String.valueOf(iqset.getGroupName())); TextView tvDate = (TextView) convertView.findViewById(R.id.tv_date); - tvDate.setText(String.valueOf(iqset.getKey())); + tvDate.setText(String.valueOf(iqset.getDate())); String idIQSet; - int size = -1; + int size = 0; try { idIQSet = new SmilePlugServerManager().getIdIQSetByPosition(ip, getContext(), position); @@ -65,7 +65,8 @@ public View getView(int position, View convertView, ViewGroup parent) { catch (NetworkErrorException e) { e.printStackTrace(); } TextView tvSize = (TextView) convertView.findViewById(R.id.tv_size); - tvSize.setText(String.valueOf(size)); + if(size < 10) tvSize.setText("0"+String.valueOf(size)); + else tvSize.setText(String.valueOf(size)); } return convertView;