mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-30 15:38:59 +00:00
Display post message content.
This commit is contained in:
parent
488ac397fa
commit
5d7efdc8d5
@ -91,6 +91,9 @@ public class PostsAdapter extends ArrayAdapter<Post>{
|
||||
((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;
|
||||
}
|
||||
}
|
||||
|
@ -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">
|
||||
|
||||
<!-- Informations about user who created the post -->
|
||||
<LinearLayout
|
||||
@ -14,6 +15,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/user_account_image"
|
||||
android:src="@drawable/default_account_image"
|
||||
android:contentDescription="@string/user_image_description"
|
||||
android:layout_width="@dimen/account_image_default_width"
|
||||
android:layout_height="@dimen/account_image_default_height" />
|
||||
|
||||
@ -45,5 +47,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Post content -->
|
||||
<TextView
|
||||
android:id="@+id/post_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="Post content"
|
||||
style="@style/PostContent" />
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -28,6 +28,12 @@
|
||||
</style>
|
||||
|
||||
<!-- Posts style -->
|
||||
<!-- Post contener -->
|
||||
<style name="PostContener">
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Post header -->
|
||||
<style name="PostHeader">
|
||||
<item name="android:padding">2dp</item>
|
||||
@ -44,4 +50,11 @@
|
||||
<style name="PostDate">
|
||||
<item name="android:paddingLeft">10dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Post content -->
|
||||
<style name="PostContent">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:layout_marginTop">5dp</item>
|
||||
<item name="android:layout_marginBottom">2dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user