mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-09-20 22:39:08 +00:00
Display post creators name and avatar
This commit is contained in:
31
app/src/main/res/layout/post_item.xml
Normal file
31
app/src/main/res/layout/post_item.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- Informations about user who created the post -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/PostHeader">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_account_image"
|
||||
android:src="@drawable/default_account_image"
|
||||
android:layout_width="@dimen/account_image_default_width"
|
||||
android:layout_height="@dimen/account_image_default_height" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_account_name"
|
||||
style="@style/PostOwnerName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="User name"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@@ -26,4 +26,15 @@
|
||||
<item name="android:paddingStart">5dp</item>
|
||||
<item name="android:paddingEnd">5dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Posts style -->
|
||||
<!-- Post header -->
|
||||
<style name="PostHeader">
|
||||
<item name="android:padding">2dp</item>
|
||||
</style>
|
||||
|
||||
<!-- Post owner name -->
|
||||
<style name="PostOwnerName">
|
||||
<item name="android:paddingStart">10dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user