mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-27 15:59:29 +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.
|
((TextView) convertView.findViewById(R.id.post_creation_time)).setText(utils.
|
||||||
timeToString(Utilities.time() - post.getPost_time()));
|
timeToString(Utilities.time() - post.getPost_time()));
|
||||||
|
|
||||||
|
//Set post conent
|
||||||
|
((TextView) convertView.findViewById(R.id.post_content)).setText(Utilities.prepareStringTextView(post.getContent()));
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
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 -->
|
<!-- Informations about user who created the post -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -14,6 +15,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/user_account_image"
|
android:id="@+id/user_account_image"
|
||||||
android:src="@drawable/default_account_image"
|
android:src="@drawable/default_account_image"
|
||||||
|
android:contentDescription="@string/user_image_description"
|
||||||
android:layout_width="@dimen/account_image_default_width"
|
android:layout_width="@dimen/account_image_default_width"
|
||||||
android:layout_height="@dimen/account_image_default_height" />
|
android:layout_height="@dimen/account_image_default_height" />
|
||||||
|
|
||||||
@ -45,5 +47,13 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
@ -28,6 +28,12 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Posts style -->
|
<!-- Posts style -->
|
||||||
|
<!-- Post contener -->
|
||||||
|
<style name="PostContener">
|
||||||
|
<item name="android:paddingTop">5dp</item>
|
||||||
|
<item name="android:paddingBottom">5dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Post header -->
|
<!-- Post header -->
|
||||||
<style name="PostHeader">
|
<style name="PostHeader">
|
||||||
<item name="android:padding">2dp</item>
|
<item name="android:padding">2dp</item>
|
||||||
@ -44,4 +50,11 @@
|
|||||||
<style name="PostDate">
|
<style name="PostDate">
|
||||||
<item name="android:paddingLeft">10dp</item>
|
<item name="android:paddingLeft">10dp</item>
|
||||||
</style>
|
</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>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user