From 5d7efdc8d561aff86506e2e98c77c9be75651a60 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sat, 27 Jan 2018 17:21:38 +0100 Subject: [PATCH] Display post message content. --- .../comunic/client/ui/adapters/PostsAdapter.java | 3 +++ app/src/main/res/layout/post_item.xml | 12 +++++++++++- app/src/main/res/values/styles.xml | 13 +++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/PostsAdapter.java b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/PostsAdapter.java index 6da6ffb..02e1235 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/PostsAdapter.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/ui/adapters/PostsAdapter.java @@ -91,6 +91,9 @@ public class PostsAdapter extends ArrayAdapter{ ((TextView) convertView.findViewById(R.id.post_creation_time)).setText(utils. timeToString(Utilities.time() - post.getPost_time())); + //Set post conent + ((TextView) convertView.findViewById(R.id.post_content)).setText(Utilities.prepareStringTextView(post.getContent())); + return convertView; } } diff --git a/app/src/main/res/layout/post_item.xml b/app/src/main/res/layout/post_item.xml index a5baecd..d1552d0 100644 --- a/app/src/main/res/layout/post_item.xml +++ b/app/src/main/res/layout/post_item.xml @@ -3,7 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + style="@style/PostContener"> @@ -45,5 +47,13 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 688a2a6..e36d431 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -28,6 +28,12 @@ + + + + + +