2018-02-03 14:26:43 +01:00

80 lines
2.6 KiB
XML

<?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"
style="@style/PostContener">
<!-- 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:contentDescription="@string/user_image_description"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center">
<!-- User name -->
<TextView
android:id="@+id/user_account_name"
style="@style/PostOwnerName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
tools:text="User name" />
<!-- Post creation time -->
<TextView
android:id="@+id/post_creation_time"
style="@style/PostDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="15 days ago"/>
</LinearLayout>
<!-- Separator -->
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<!-- Post visibility level -->
<TextView
android:id="@+id/post_visibility"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Public"
style="@style/PostVisibility"/>
</LinearLayout>
<!-- Post image (if any) -->
<ImageView
android:id="@+id/post_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitCenter"/>
<!-- 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>