<?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="@drawable/bkrnd"
    tools:context="com.getbubblenow.android.activity.MainActivity">


    <ImageView
        android:id="@+id/union"
        android:layout_width="@dimen/union_width"
        android:layout_height="@dimen/union_height"
        android:layout_marginBottom="@dimen/union_marginBottom"
        android:scaleType="fitXY"
        android:src="@drawable/union"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/constraint_layout_connected_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginTop="@dimen/margin_top"
        android:layout_marginEnd="@dimen/margin_start_and_end"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/bubbleConnectionTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="@dimen/bubble_connection_marginTop"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:fontFamily="@font/josefin_sans"
            android:letterSpacing="-0.02"
            android:text="@string/my_bubble"
            android:textColor="@color/black"
            android:textSize="@dimen/bubble_connection_title_text_size"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.498"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="@dimen/margin_start_and_end"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:text="@string/your_private_bubble"
            android:textAlignment="center"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/bubbleConnectionTitle" />


        <TextView
            android:id="@+id/logout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:enabled="false"
            android:text="@string/log_out"
            android:textColor="@color/logout"
            android:textSize="@dimen/text_title"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/title" />
    </androidx.constraintlayout.widget.ConstraintLayout>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/constraints_layout_connected_bubble"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        app:layout_constraintTop_toTopOf="@id/constraints_middle"
        app:layout_constraintBottom_toTopOf="@+id/constraints_middle"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <ImageView
            android:id="@+id/imageMyBubble"
            android:layout_width="285.56dp"
            android:layout_height="378.72dp"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:layout_marginBottom="120dp"
            android:src="@drawable/bubble_disconnected"
            app:layout_constraintBottom_toTopOf="@+id/linearLayout"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/constraints" />

        <TextView
            android:id="@+id/titleMyBubble"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="45dp"
            android:letterSpacing="-0.05"
            android:text="@string/bubble_status"
            android:textColor="@android:color/black"
            android:textSize="@dimen/myBubble_text_size"
            android:textStyle="bold"
            app:layout_constraintBottom_toTopOf="@+id/constraints"
            app:layout_constraintEnd_toEndOf="@+id/imageMyBubble"
            app:layout_constraintStart_toStartOf="@+id/imageMyBubble" />

        <ImageView
            android:id="@+id/mark"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="80dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:src="@drawable/mark"
            android:visibility="gone"

            app:layout_constraintEnd_toEndOf="@+id/imageMyBubble"
            app:layout_constraintStart_toStartOf="@+id/imageMyBubble"
            app:layout_constraintTop_toTopOf="@+id/imageMyBubble" />

        <TextView
            android:id="@+id/bubbleStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="150dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:layout_marginBottom="120dp"
            android:text="@string/not_connected_bubble"
            android:textColor="@color/gray"
            android:textSize="12sp"
            app:layout_constraintBottom_toTopOf="@+id/linearLayout"
            app:layout_constraintEnd_toEndOf="@+id/imageMyBubble"
            app:layout_constraintStart_toStartOf="@+id/imageMyBubble"
            app:layout_constraintTop_toTopOf="@+id/imageMyBubble" />

        <LinearLayout
            android:id="@+id/linearLayout"
            android:layout_width="@dimen/edit_text_width"
            android:layout_height="@dimen/edit_text_height"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="100dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:background="@android:color/transparent"
            android:orientation="vertical"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/constraints">

            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/connectButton"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/sign_in_enable"
                android:enabled="false"
                android:text="@string/connect"
                android:textAlignment="center"
                android:textAllCaps="false"
                android:textColor="@color/white"
                android:textSize="@dimen/text_title" />

            <androidx.appcompat.widget.AppCompatButton
                android:id="@+id/launchNewBubbleButton"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/sign_in_enable"
                android:enabled="false"
                android:text="@string/launch_new_bubble"
                android:textAlignment="center"
                android:textAllCaps="false"
                android:textColor="@color/white"
                android:textSize="@dimen/text_title" />

        </LinearLayout>

        <androidx.constraintlayout.widget.Constraints
            android:id="@+id/constraints"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="@dimen/margin_start_and_end"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:layout_marginBottom="@dimen/margin_start_and_end"
            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/constraint_layout_disconnected_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginTop="@dimen/margin_top"
        android:layout_marginEnd="@dimen/margin_start_and_end"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        >

        <TextView
            android:id="@+id/bubble_building_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="@dimen/bubble_connection_marginTop"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:fontFamily="@font/lato"
            android:letterSpacing="-0.02"
            android:text="@string/building_bubble_title"
            android:textAlignment="center"
            android:textColor="@color/black"
            android:textSize="@dimen/title"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.498"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/private_bubble"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="40dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:fontFamily="@font/lato"
            android:letterSpacing="-0.02"
            android:text="@string/private_bubble"
            android:textAlignment="center"
            android:textColor="@color/black"
            android:textSize="@dimen/title"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.498"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/bubble_building_title" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/constraints_layout_disconnected_bubble"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginEnd="@dimen/margin_start_and_end"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/constraints_middle"
        app:layout_constraintBottom_toTopOf="@+id/constraints_middle"
        >
        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/network_progress"
            android:layout_width="300dp"
            android:layout_height="300dp"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:background="@android:color/transparent"
            android:backgroundTint="@android:color/transparent"
            android:foregroundGravity="center_horizontal"
            app:layout_constraintBottom_toBottomOf="@+id/progress_constraints"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/progress_constraints"
            app:lottie_rawRes="@raw/progress_loading" />

        <TextView
            android:id="@+id/progress_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="250dp"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:fontFamily="@font/lato"
            android:paddingTop="10dp"
            android:textColor="@android:color/black"
            android:textStyle="bold"
            android:textSize="@dimen/myBubble_text_size"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/network_progress" />

        <androidx.constraintlayout.widget.Constraints
            android:id="@+id/progress_constraints"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_start_and_end"
            android:layout_marginTop="@dimen/margin_start_and_end"
            android:layout_marginEnd="@dimen/margin_start_and_end"
            android:layout_marginBottom="@dimen/margin_start_and_end"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <ImageButton
        android:id="@+id/accountButton"
        android:layout_width="@dimen/icons_size"
        android:layout_height="@dimen/icons_size"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginBottom="44dp"
        android:background="@drawable/account"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/supportButton"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent" />

    <ImageButton
        android:id="@+id/supportButton"
        android:layout_width="@dimen/icons_size"
        android:layout_height="@dimen/icons_size"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginEnd="@dimen/margin_start_and_end"
        android:background="@drawable/support"
        app:layout_constraintBottom_toBottomOf="@+id/accountButton"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@+id/accountButton"
        app:layout_constraintTop_toTopOf="@+id/accountButton" />

    <ImageButton
        android:id="@+id/imageButton"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_marginTop="32dp"
        android:background="@drawable/home"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/supportButton"
        app:layout_constraintStart_toEndOf="@+id/accountButton"
        app:layout_constraintTop_toTopOf="@+id/accountButton" />

    <androidx.constraintlayout.widget.Constraints
        android:id="@+id/constraints_middle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/margin_start_and_end"
        android:layout_marginTop="@dimen/margin_start_and_end"
        android:layout_marginEnd="@dimen/margin_start_and_end"
        android:layout_marginBottom="@dimen/margin_start_and_end"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
