<?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:clickable="true"
    android:layout_height="match_parent"
    android:hapticFeedbackEnabled="true"
    tools:context=".ui.home.HomeFragment">

    <Button
        android:id="@+id/shutdown"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="5dp"
        android:layout_marginTop="10dp"
        android:background="@drawable/button_round"
        android:hapticFeedbackEnabled="true"
        android:text="@string/shutdown"
        app:backgroundTint="@null"
        app:icon="@drawable/power_settings_new_24px"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/reboot" />

    <Button
        android:id="@+id/reboot"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/button_round"
        android:hapticFeedbackEnabled="true"
        android:text="@string/reboot"
        app:backgroundTint="@null"
        app:icon="@drawable/restart_alt_24px"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/ipInput" />

    <ImageView
        android:id="@+id/Background"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#80FFFFFF"
        android:scaleType="centerCrop"
        android:src="@drawable/background_red_blue"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0" />


    <TextView
        android:id="@+id/text_home"
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="50dp"
        android:gravity="center_horizontal"
        android:text="@string/Welcome_to_your_HOMEAUTOMATION_APP"
        android:textAlignment="center"
        android:textSize="20sp"
        app:layout_constraintBottom_toTopOf="@+id/reboot"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/login_data"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:textAlignment="center"
        android:textColor="#00FF00"
        android:textSize="14sp"
        app:layout_constraintEnd_toEndOf="@+id/text_home"
        app:layout_constraintStart_toStartOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/text_home" />

    <EditText
        android:id="@+id/ipInput"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="25dp"
        android:backgroundTint="@color/mtrl_btn_text_color_selector"
        android:ems="10"
        android:hint="@string/login_ipaddress"
        android:inputType="text"
        app:layout_constraintEnd_toEndOf="@+id/text_home"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/login_data" />

    <EditText
        android:id="@+id/loginuserInput"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/mtrl_btn_text_color_selector"
        android:ems="10"
        android:hint="@string/login_username"
        android:inputType="textEmailAddress"
        android:singleLine="false"
        app:layout_constraintEnd_toEndOf="@+id/text_home"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/ipInput" />

    <EditText
        android:id="@+id/loginpasswordInput"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/mtrl_btn_text_color_selector"
        android:ems="10"
        android:hint="@string/login_password"
        android:inputType="textPassword"
        app:layout_constraintEnd_toEndOf="@+id/text_home"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/loginuserInput"
        app:passwordToggleEnabled="true"/>

    <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/loginButton"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_marginTop="25dp"
        android:background="@drawable/button_round"
        android:drawableLeft="@drawable/login_24px"
        android:drawableTint="?android:attr/textColor"
        android:hapticFeedbackEnabled="true"
        android:text="@string/login"
        app:backgroundTint="@null"
        app:layout_constraintStart_toStartOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/loginpasswordInput" />

    <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/logoutButton"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_marginTop="25dp"
        android:background="@drawable/button_round"
        android:drawableRight="@drawable/logout_24px"
        android:drawableTint="?android:attr/textColor"
        android:hapticFeedbackEnabled="true"
        android:text="@string/logout"
        app:backgroundTint="@null"
        app:layout_constraintEnd_toEndOf="@+id/text_home"
        app:layout_constraintTop_toBottomOf="@+id/loginpasswordInput" />

    <ImageView
        android:id="@+id/togglepassword"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="-30dp"
        android:src="@drawable/visibility_black_24dp"
        app:tint="?android:attr/textColor"
        app:layout_constraintBottom_toBottomOf="@+id/loginpasswordInput"
        app:layout_constraintStart_toEndOf="@+id/loginpasswordInput"
        app:layout_constraintTop_toBottomOf="@+id/loginuserInput" />


</androidx.constraintlayout.widget.ConstraintLayout>

