mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-05-06 11:49:43 +00:00
177 lines
6.9 KiB
XML
177 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
style="@style/PostContainer"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
|
|
android:id="@+id/user_account_image"
|
|
android:layout_width="@dimen/account_image_default_width"
|
|
android:layout_height="@dimen/account_image_default_height"
|
|
android:contentDescription="@string/user_image_description"
|
|
android:src="@drawable/default_account_image" />
|
|
|
|
|
|
<!-- 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"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="8dp"
|
|
app:layout_constraintStart_toEndOf="@+id/user_account_image"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="User name" />
|
|
|
|
<ImageView
|
|
android:id="@+id/target_arrow"
|
|
style="@style/PostTargetArrow"
|
|
android:layout_width="15dp"
|
|
android:layout_height="13dp"
|
|
android:scaleType="centerInside"
|
|
app:layout_constraintBottom_toTopOf="@+id/post_creation_time"
|
|
app:layout_constraintStart_toEndOf="@+id/user_account_name"
|
|
app:layout_constraintTop_toTopOf="@+id/user_account_name"
|
|
tools:ignore="ContentDescription" />
|
|
|
|
<TextView
|
|
android:id="@+id/target_page_name"
|
|
style="@style/PostOwnerName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintBottom_toBottomOf="@+id/target_arrow"
|
|
app:layout_constraintStart_toEndOf="@+id/target_arrow"
|
|
app:layout_constraintTop_toTopOf="@+id/target_arrow"
|
|
tools:text="Target Page" />
|
|
|
|
<!-- Post creation time -->
|
|
<TextView
|
|
android:id="@+id/post_creation_time"
|
|
style="@style/PostDate"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintStart_toStartOf="@+id/user_account_name"
|
|
app:layout_constraintTop_toBottomOf="@+id/user_account_name"
|
|
tools:text="15 days ago" />
|
|
|
|
|
|
<!-- Post visibility level -->
|
|
<ImageView
|
|
android:id="@+id/post_visibility"
|
|
style="@style/PostVisibility"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="@dimen/post_options_btn_height"
|
|
android:layout_gravity="top"
|
|
android:contentDescription="@string/post_visibility_icon"
|
|
android:src="@drawable/ic_public"
|
|
android:tint="@color/darker_gray"
|
|
app:layout_constraintEnd_toStartOf="@+id/post_actions_btn"
|
|
app:layout_constraintTop_toTopOf="@+id/post_actions_btn"
|
|
tools:text="Public" />
|
|
|
|
<!-- Actions button -->
|
|
<ImageView
|
|
android:id="@+id/post_actions_btn"
|
|
style="@style/PostActionsButton"
|
|
android:layout_width="@dimen/post_options_btn_width"
|
|
android:layout_height="@dimen/post_options_btn_height"
|
|
android:layout_gravity="top"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginTop="8dp"
|
|
android:contentDescription="@string/post_action_btn_description"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
<!-- Additional views -->
|
|
<FrameLayout
|
|
android:id="@+id/additional_views"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/user_account_image"
|
|
tools:layout_height="10dp" />
|
|
|
|
<!-- Post content -->
|
|
<org.communiquons.android.comunic.client.ui.views.ContentTextView
|
|
android:id="@+id/post_content"
|
|
style="@style/PostContent"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/additional_views"
|
|
tools:text="Post content" />
|
|
|
|
<!-- Like button -->
|
|
<org.communiquons.android.comunic.client.ui.views.LikeButtonView
|
|
android:id="@+id/like_button"
|
|
style="@style/PostLikeButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/post_content" />
|
|
|
|
<!-- Post comments -->
|
|
<LinearLayout
|
|
android:id="@+id/comments_list"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:orientation="vertical"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/like_button"
|
|
tools:background="@color/holo_red_dark"
|
|
tools:layout_height="30dp" />
|
|
|
|
<!-- Comments form -->
|
|
<LinearLayout
|
|
android:id="@+id/create_comment_form"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:orientation="horizontal"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/comments_list">
|
|
|
|
<!-- Comment hint -->
|
|
<org.communiquons.android.comunic.client.ui.views.EditCommentContentView
|
|
android:id="@+id/input_comment_content"
|
|
style="@style/TextAppearance.AppCompat"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:hint="@string/new_comment_hint"
|
|
android:inputType="text" />
|
|
|
|
<ImageView
|
|
android:id="@+id/comment_send_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:contentDescription="@string/action_send"
|
|
android:src="@android:drawable/ic_menu_send" />
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
</android.support.constraint.ConstraintLayout> |