Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
8.5 kB
3
Indexable
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
    android:layout_width="match_parent"
    android:background="@color/gray2"
    android:layout_height="match_parent"
    tools:context=".activities.PostDetailActivity">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/layout_header"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:background="@drawable/background_cus"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/img_back"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="20dp"
                android:padding="5dp"
                android:src="@drawable/icon_back_left"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/txt_type_post"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Bản tin công nghệ"
                android:textColor="@color/white"
                android:textSize="18sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/layout_author"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/layout_header"
            android:visibility="visible"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/layout_header">

            <androidx.cardview.widget.CardView
                android:id="@+id/cv_avatar"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="20dp"
                android:layout_marginTop="16dp"
                android:scaleType="centerCrop"
                app:cardCornerRadius="50dp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/img_avatar_user"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:scaleType="centerCrop"
                    android:src="@drawable/item1" />

            </androidx.cardview.widget.CardView>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/txt_name_user"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="16dp"
                android:text="@string/full_name"
                android:textColor="@color/black"
                android:textSize="18sp"
                app:layout_constraintStart_toEndOf="@+id/cv_avatar"
                app:layout_constraintTop_toTopOf="parent" />


            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/txt_time_create_post"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="5dp"
                android:text="@string/date_time"
                android:textColor="@color/gray"
                android:textSize="14sp"
                app:layout_constraintStart_toEndOf="@+id/cv_avatar"
                app:layout_constraintTop_toBottomOf="@+id/txt_name_user" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/txt_header_post"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/layout_author"
            android:layout_alignParentStart="true"
            android:layout_alignParentEnd="true"
            android:layout_marginHorizontal="20dp"
            android:gravity="center"
            android:text="@string/header_post"
            android:textColor="@color/black"
            android:textSize="18sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/layout_author" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/line1"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_below="@+id/txt_header_post"
            android:layout_marginHorizontal="50dp"
            android:layout_marginTop="5dp"
            android:background="@color/gray"
            app:layout_constraintTop_toBottomOf="@+id/txt_header_post"
            tools:layout_editor_absoluteX="49dp" />

        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/txt_body_post"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/line1"
            android:layout_marginHorizontal="20dp"
            android:layout_marginStart="20dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="20dp"
            android:text="@string/example_news"
            android:textColor="@color/black"
            android:textSize="16sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/line1" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rcv_list_image"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/txt_body_post"
            android:layout_marginHorizontal="20dp"
            android:layout_marginStart="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="20dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/txt_body_post" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/btn_question_answer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/rcv_list_image"
            android:layout_centerHorizontal="true"
            android:layout_marginHorizontal="20dp"
            android:layout_marginStart="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="20dp"
            android:layout_marginBottom="20dp"
            android:background="@drawable/button_cus"
            android:foreground="@drawable/animation_click"
            android:text="@string/question_answer"
            android:textColor="@color/white"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/rcv_list_image" />
    </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>