<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#F8F8F8">

    <LinearLayout
        android:id="@+id/title_layout"
        android:layout_width="match_parent"
        android:layout_height="46dp"
        android:layout_alignParentTop="true"
        android:background="@color/white"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <LinearLayout
            android:id="@+id/back_btn"
            android:layout_width="42dp"
            android:layout_height="match_parent"
            android:layout_marginStart="8dp"
            android:gravity="center">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/back_black_icon" />

        </LinearLayout>

        <TextView
            android:id="@+id/title_tv"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:text="@string/preview"
            android:textColor="@color/black"
            android:textSize="16dp"
            android:textStyle="bold" />

        <LinearLayout
            android:layout_width="42dp"
            android:layout_height="match_parent"
            android:layout_marginEnd="8dp"
            android:gravity="center"
            android:visibility="invisible">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/back_black_icon" />

        </LinearLayout>

    </LinearLayout>

    <ImageView
        android:id="@+id/preview_iv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/title_layout"
        android:scaleType="centerCrop" />


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="32dp"
        android:layout_marginTop="88dp"
        android:layout_marginEnd="88dp"
        android:background="@drawable/drw_preview_message_bg">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="12dp"
            android:text="Wow! This keyboard background is so cool!"
            android:textSize="14sp" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:gravity="bottom"
        android:orientation="vertical">

        <RelativeLayout
            android:id="@+id/edit_layout"
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:layout_marginBottom="16dp"
            android:background="@color/white"
            android:orientation="vertical">

            <TextView
                android:id="@+id/tv"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="8dp"
                android:gravity="center_vertical"
                android:hint="Activate to enter text..."
                android:textSize="14sp" />

            <EditText
                android:id="@+id/edit"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginStart="16dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginBottom="8dp"
                android:background="@null"
                android:gravity="center_vertical"
                android:hint="Activate to enter text..."
                android:textSize="14sp" />

        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/unauthorized_layout"
            android:layout_width="match_parent"
            android:layout_height="200dp">

            <View
                android:id="@+id/keyboard_iv"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#99000000"
                android:gravity="center">

                <LinearLayout
                    android:id="@+id/activate_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="46dp"
                    android:background="@mipmap/activate_btn_bg"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/gou_icon" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:gravity="center"
                        android:text="Activate"
                        android:textColor="@color/black"
                        android:textSize="16dp"
                        android:textStyle="bold" />

                </LinearLayout>
            </LinearLayout>
        </RelativeLayout>

    </LinearLayout>

    <RelativeLayout
        android:id="@+id/dialog_step_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/title_layout"
        android:background="#99000000"
        android:visibility="gone">

        <LinearLayout
            android:id="@+id/activate_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@drawable/draw_activate_layout_bg"
            android:orientation="vertical"
            android:visibility="visible">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="16dp"
                android:gravity="center"
                android:text="Activate Keyboard Journey"
                android:textColor="@color/black"
                android:textSize="14dp"
                android:textStyle="bold" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:layout_margin="16dp">

                <TextView
                    android:id="@+id/step_1_btn"
                    android:layout_width="0dp"
                    android:layout_height="46dp"
                    android:layout_marginEnd="4dp"
                    android:layout_weight="1"
                    android:background="@drawable/drw_gray_select_bg"
                    android:gravity="center"
                    android:text="Step 1:Select"
                    android:textColor="#999999"
                    android:textSize="14sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/step_2_btn"
                    android:layout_width="0dp"
                    android:layout_height="46dp"
                    android:layout_marginStart="4dp"
                    android:layout_weight="1"
                    android:background="@mipmap/activate_btn_bg"
                    android:gravity="center"
                    android:text="Step 2:Enabled"
                    android:textColor="@color/black"
                    android:textSize="14sp"
                    android:textStyle="bold" />

            </LinearLayout>
        </LinearLayout>

    </RelativeLayout>
</RelativeLayout>