diff --git a/briar-android/res/values/color.xml b/briar-android/res/values/color.xml index c306f6ddbb4fac83da33cfc965b39403cce6c3aa..d05bd0428c1666c2ffa46137b1413d12f6e48eba 100644 --- a/briar-android/res/values/color.xml +++ b/briar-android/res/values/color.xml @@ -9,4 +9,5 @@ <color name="compose_background">#FFFFFF</color> <color name="horizontal_border">#CCCCCC</color> <color name="no_posts">#AAAAAA</color> + <color name="private_message_date">#AAAAAA</color> </resources> \ No newline at end of file diff --git a/briar-android/src/org/briarproject/android/contact/ConversationAdapter.java b/briar-android/src/org/briarproject/android/contact/ConversationAdapter.java index 3a3ae841ee19fb664e59ffac372091be7e35c1cd..ce82052daffc4c63551072d5590025541bacbc9f 100644 --- a/briar-android/src/org/briarproject/android/contact/ConversationAdapter.java +++ b/briar-android/src/org/briarproject/android/contact/ConversationAdapter.java @@ -48,18 +48,6 @@ class ConversationAdapter extends ArrayAdapter<ConversationItem> { if(header.isRead()) background = res.getColor(R.color.read_background); else background = res.getColor(R.color.unread_background); - TextView date = new TextView(ctx); - date.setId(1); - date.setLayoutParams(MATCH_WRAP); - if(header.isLocal()) date.setGravity(RIGHT); - else date.setGravity(LEFT); - date.setTextSize(14); - date.setBackgroundColor(background); - date.setPadding(pad, pad, pad, 0); - long timestamp = header.getTimestamp(); - date.setText(DateUtils.getRelativeTimeSpanString(ctx, timestamp)); - layout.addView(date); - View content; if(item.getBody() == null) { TextView ellipsis = new TextView(ctx); @@ -77,9 +65,22 @@ class ConversationAdapter extends ArrayAdapter<ConversationItem> { content.setId(2); content.setLayoutParams(MATCH_WRAP); content.setBackgroundColor(background); - content.setPadding(pad, 0, pad, pad); + content.setPadding(pad, pad, pad, 0); layout.addView(content); + TextView date = new TextView(ctx); + date.setId(1); + date.setLayoutParams(MATCH_WRAP); + if(header.isLocal()) date.setGravity(RIGHT); + else date.setGravity(LEFT); + date.setTextSize(14); + date.setTextColor(res.getColor(R.color.private_message_date)); + date.setBackgroundColor(background); + date.setPadding(pad, 0, pad, pad); + long timestamp = header.getTimestamp(); + date.setText(DateUtils.getRelativeTimeSpanString(ctx, timestamp)); + layout.addView(date); + return layout; } } \ No newline at end of file