Adds ability to localize timestamps.
This commit is contained in:
parent
8559a6d75c
commit
d55181ccd0
3 changed files with 47 additions and 13 deletions
|
@ -169,7 +169,7 @@ public class StatusViewHolder extends RecyclerView.ViewHolder {
|
|||
if (createdAt != null) {
|
||||
long then = createdAt.getTime();
|
||||
long now = new Date().getTime();
|
||||
readout = DateUtils.getRelativeTimeSpanString(then, now);
|
||||
readout = DateUtils.getRelativeTimeSpanString(sinceCreated.getContext(), then, now);
|
||||
readoutAloud = android.text.format.DateUtils.getRelativeTimeSpanString(then, now,
|
||||
android.text.format.DateUtils.SECOND_IN_MILLIS,
|
||||
android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue