<?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"
    tools:context=".SettingsActivity">

    <RelativeLayout
        android:background="@color/background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".SettingsActivity">

        <RelativeLayout
            android:visibility="visible"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:context=".SettingsActivity">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="0dp"
                android:background="@color/title"
                android:text="Settings"
                android:padding="5dp"
                android:textStyle="bold"
                android:textSize="30dp"
                android:textAlignment="center"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="5dp"
                android:weightSum="1.0"
                tools:context=".MainActivity">


                <TextView
                    android:id="@+id/lbl_settings_device_no"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="50dp"
                    android:height="40dp"
                    android:padding="5dp"
                    android:text="Device No."
                    android:textAlignment="textStart"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:textColor="@color/txt_color"
                    android:textSize="20dp" />

                <EditText
                    android:id="@+id/txt_settings_device_no"
                    android:layout_width="350dp"
                    android:layout_height="40dp"
                    android:layout_alignBottom="@+id/lbl_settings_device_no"
                    android:layout_toEndOf="@+id/lbl_settings_device_no"
                    android:background="@color/white"
                    android:inputType="text"
                    android:padding="5dp"
                    android:textColor="@color/txt_color" />

                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/ll_server_mode"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/lbl_settings_device_no"
                    android:layout_marginBottom="5dp"
                    android:orientation="horizontal"
                    android:weightSum="1.0">

                    <TextView
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp"
                        android:layout_weight=".5"
                        android:padding="5dp"
                        android:text="Server mode :"
                        android:textColor="@color/txt_color"
                        android:textSize="20dp"
                        android:textStyle="bold" />

                    <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp"
                        android:layout_weight=".5"
                        android:orientation="vertical">

                        <RadioButton
                            android:id="@+id/rd_http"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:onClick="onServerModeClicked"
                            android:text="HTTP"
                            android:textColor="@color/txt_color" />

                        <RadioButton
                            android:id="@+id/rd_ftp"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:onClick="onServerModeClicked"
                            android:text="FTP"
                            android:textColor="@color/txt_color" />
                    </RadioGroup>
                </LinearLayout>

                <TextView
                    android:id="@+id/lbl_settings_server"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/ll_server_mode"
                    android:height="40dp"
                    android:padding="5dp"
                    android:text="Server : "
                    android:textAlignment="textStart"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:textColor="@color/txt_color"
                    android:textSize="20dp" />

                <EditText
                    android:id="@+id/txt_server"
                    android:layout_width="match_parent"
                    android:layout_height="40dp"
                    android:layout_below="@id/ll_server_mode"
                    android:layout_toEndOf="@id/lbl_settings_server"
                    android:background="@color/white"
                    android:inputType="text"
                    android:padding="5dp"
                    android:textColor="@color/txt_color" />

                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/lbl_user_password"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/txt_server"
                    android:orientation="horizontal"
                    android:weightSum="1.0">

                    <TextView
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp"
                        android:layout_weight=".5"
                        android:padding="2dp"
                        android:text="User"
                        android:textAlignment="textStart"
                        android:textColor="@color/txt_color"
                        android:textSize="20dp" />

                    <TextView
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="5dp"
                        android:layout_weight=".5"
                        android:padding="2dp"
                        android:text="Password"
                        android:textAlignment="textStart"
                        android:textColor="@color/txt_color"
                        android:textSize="20dp" />
                </LinearLayout>

                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/txt_user_password"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/lbl_user_password"
                    android:layout_marginBottom="5dp"
                    android:orientation="horizontal"
                    android:weightSum="1.0">

                    <EditText
                        android:id="@+id/txt_user"
                        android:layout_width="0dip"
                        android:layout_height="40dp"
                        android:layout_weight=".5"
                        android:background="@color/white"
                        android:inputType="text"
                        android:padding="5dp"
                        android:textColor="@color/txt_color" />

                    <EditText
                        android:id="@+id/txt_password"
                        android:layout_width="0dip"
                        android:layout_height="40dp"
                        android:layout_marginLeft="5dp"
                        android:layout_weight=".5"
                        android:background="@color/white"
                        android:inputType="text"
                        android:padding="5dp"
                        android:textColor="@color/txt_color" />
                </LinearLayout>

                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/ll_path"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/txt_user_password"
                    android:layout_marginBottom="5dp"
                    android:orientation="horizontal"
                    android:weightSum="1.0">

                    <TextView
                        android:id="@+id/lbl_settings_path"
                        android:layout_width="0dip"
                        android:layout_height="40dp"
                        android:layout_weight=".3"
                        android:height="40dp"
                        android:padding="5dp"
                        android:text="Path :"
                        android:textAlignment="textStart"
                        android:textAppearance="?android:attr/textAppearanceLarge"
                        android:textColor="@color/txt_color"
                        android:textSize="20dp" />

                    <EditText
                        android:id="@+id/txt_path"
                        android:layout_width="0dip"
                        android:layout_height="40dp"
                        android:layout_below="@id/lbl_settings_path"
                        android:layout_weight=".7"
                        android:background="@color/white"
                        android:inputType="text"
                        android:padding="5dp"
                        android:textColor="@color/txt_color" />
                </LinearLayout>


                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/layout_settings_main_button"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/ll_path"
                    android:layout_marginTop="10dp"
                    android:orientation="horizontal"
                    android:weightSum="1.0">

                    <Button
                        android:id="@+id/btn_settings_submit"
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_weight=".5"
                        android:background="@color/btn_confirm"
                        android:backgroundTint="@color/btn_confirm"
                        android:hint="Save"
                        android:textColorHint="@color/txt_color"
                        android:textSize="20dp"
                        android:textStyle="normal" />

                    <Button
                        android:id="@+id/btn_settings_cancel"
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:layout_weight=".5"
                        android:background="@color/btn_background"
                        android:backgroundTint="@color/btn_backgroundtint"
                        android:hint="Cancel"
                        android:textColorHint="@color/txt_color"
                        android:textSize="20dp"
                        android:textStyle="normal" />
                </LinearLayout>

                <Button
                    android:id="@+id/btn_restore_default_factory"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/layout_settings_main_button"
                    android:layout_marginTop="10dp"
                    android:background="@color/btn_background"
                    android:backgroundTint="@color/btn_background"
                    android:hint="Restore Default Factory"
                    android:textColorHint="@color/txt_color"
                    android:textSize="20dp"
                    android:textStyle="normal" />

                <EditText
                    android:id="@+id/txt_server_mode"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/btn_restore_default_factory"
                    android:layout_marginTop="50dp"
                    android:background="@color/white"
                    android:inputType="text"
                    android:padding="5dp"
                    android:textColor="@color/txt_color" />


            </RelativeLayout>

        </RelativeLayout>

    </RelativeLayout>

</androidx.constraintlayout.widget.ConstraintLayout>