Closed GoogleCodeExporter closed 9 years ago
you can long click the message and view details, but i'll try to add a "custom
time format" feature.
Original comment by f...@ub0r.de
on 9 Oct 2011 at 1:24
I now finally came around to doing this myself… :)
@@ -601,6 +600,11 @@ public final class ConversationListActivity extends
FragmentActivity implements
*/
static String getDate(final Context context, final long time) {
long t = time;
+
+ // Get time for now - 24 hours
+ Calendar CAL_DAYAGO = Calendar.getInstance();
+ CAL_DAYAGO.add(Calendar.DAY_OF_MONTH, -1);
+
if (t < MIN_DATE) {
t *= MILLIS;
}
@@ -608,7 +612,7 @@ public final class ConversationListActivity extends
FragmentActivity implements
PreferencesActivity.PREFS_FULL_DATE, false)) {
return DateFormat.getTimeFormat(context).format(t) + " "
+ DateFormat.getDateFormat(context).format(t);
- } else if (t < CAL_TODAY.getTimeInMillis()) {
+ } else if (t < CAL_DAYAGO.getTimeInMillis()) {
return DateFormat.getDateFormat(context).format(t);
} else {
return DateFormat.getTimeFormat(context).format(t);
This is a patch against
src/de/ub0r/android/smsdroid/ConversationListActivity.java which does what I
want:
If a message is "younger" than 24 hours, display the time of the message, else
display the date of the message.
I'm not too sure, though, if you like the style of the code…
Original comment by a.skwar
on 30 Oct 2011 at 12:51
thanks for your input. i just merged your changes.
Original comment by f...@ub0r.de
on 6 Nov 2011 at 2:02
Original comment by f...@ub0r.de
on 6 Nov 2011 at 2:16
Original issue reported on code.google.com by
a.skwar
on 28 Sep 2011 at 9:37Attachments: