Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
14 kB
1
Indexable
Never
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/gray2"
    tools:context=".activities.AddPostActivity">

    <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: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="@string/add_post"
            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.appcompat.widget.AppCompatTextView
            android:id="@+id/txt_edit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="20dp"
            android:text="@string/save"
            android:textColor="@color/white"
            android:textSize="16sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/layout_header">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/layout_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/appCompatTextView8"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="Bản tin mới"
                android:textColor="@color/blue"
                android:textSize="24sp"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.cardview.widget.CardView
                android:id="@+id/cv_image_avatar_user"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="10dp"
                android:scaleType="centerCrop"
                app:cardCornerRadius="50dp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/appCompatTextView8">

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

            </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_marginLeft="15dp"
                android:text="Công ty NDC"
                android:textColor="@color/black"
                android:textSize="16sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="@+id/cv_image_avatar_user"
                app:layout_constraintStart_toEndOf="@+id/cv_image_avatar_user"
                app:layout_constraintTop_toTopOf="@+id/cv_image_avatar_user" />

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/edt_header_post"
                android:layout_width="match_parent"
                android:layout_height="80dp"
                android:layout_marginHorizontal="20dp"
                android:layout_marginTop="10dp"
                android:background="@drawable/botron_edittext1"
                android:gravity="left"
                android:hint="@string/enter_header_post"
                android:padding="10dp"
                android:textColor="@color/black"
                android:textColorHint="@color/gray"
                android:textSize="16sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/appCompatTextView9" />

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/edt_content_post"
                android:layout_width="match_parent"
                android:layout_height="250dp"
                android:layout_marginHorizontal="20dp"
                android:layout_marginTop="10dp"
                android:background="@drawable/botron_edittext1"
                android:gravity="left"
                android:hint="@string/enter_content_post"
                android:padding="10dp"
                android:textColor="@color/black"
                android:textColorHint="@color/gray"
                android:textSize="16sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/appCompatTextView10" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/appCompatTextView9"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="20dp"
                android:text="Tiêu đề bản tin"
                android:textColor="@color/black"
                android:textSize="16sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/appCompatTextView11" />


            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/appCompatTextView11"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="20dp"
                android:text="Loại bản tin"
                android:textColor="@color/black"
                android:textSize="16sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/cv_image_avatar_user" />

            <Spinner
                android:id="@+id/sp_type_post"
                android:layout_width="250dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="24dp"
                android:background="@drawable/botron_edittext1"
                android:padding="7dp"
                app:layout_constraintBottom_toBottomOf="@+id/appCompatTextView11"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@+id/appCompatTextView11" />

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/img_drop_down"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="5dp"
                android:src="@drawable/icon_arrow_drop_down"
                app:layout_constraintBottom_toBottomOf="@+id/sp_type_post"
                app:layout_constraintEnd_toEndOf="@+id/sp_type_post"
                app:layout_constraintTop_toTopOf="@+id/sp_type_post" />

            <TextView
                android:id="@+id/txt_star1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/star"
                android:textColor="@color/red"
                android:textSize="16sp"
                app:layout_constraintBottom_toBottomOf="@+id/appCompatTextView9"
                app:layout_constraintStart_toEndOf="@+id/appCompatTextView9"
                app:layout_constraintTop_toTopOf="@+id/appCompatTextView9" />

            <TextView
                android:id="@+id/txt_star2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/star"
                android:textColor="@color/red"
                android:textSize="16sp"
                app:layout_constraintBottom_toBottomOf="@+id/appCompatTextView10"
                app:layout_constraintStart_toEndOf="@+id/appCompatTextView10"
                app:layout_constraintTop_toTopOf="@+id/appCompatTextView10" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/appCompatTextView10"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="10dp"
                android:text="Nội dung bản tin"
                android:textColor="@color/black"
                android:textSize="16sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/edt_header_post" />

            <androidx.cardview.widget.CardView
                android:id="@+id/cv_add_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="20dp"
                android:scaleType="centerCrop"
                app:cardCornerRadius="50dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/edt_content_post">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/img_add_image"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    android:padding="5dp"
                    android:scaleType="centerCrop"
                    android:src="@drawable/icon_camera" />

            </androidx.cardview.widget.CardView>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/appCompatTextView7"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_marginTop="10dp"
                android:text="Thêm hình ảnh*"
                android:textColor="@color/black"
                android:textSize="16sp"
                android:textStyle="italic"
                app:layout_constraintBottom_toTopOf="@+id/rcv_list_image"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/edt_content_post" />

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