<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".NetworkService"
    tools:showIn="@layout/app_bar_network"
    >

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/pop_layout2"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:theme="@style/AppTheme.AppBarOverlay">
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="5dp"
            android:background="@color/blue" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="@string/obyvaci_pokoj"
            android:textColor="@color/textcolor"
            android:id="@+id/obyvaci_pokoj" />


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="2dp"
                android:background="@color/nav_back"
                android:id="@+id/textView4" />


            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/tempture"
                android:id="@+id/imageView3"
                android:scaleType="fitCenter"
                android:layout_marginTop="7dp"
                android:layout_marginLeft="7dp"
                android:layout_marginBottom="7dp"
                />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:gravity="center"
                android:text="@string/tempeture"
                android:textColor="@color/white"
                android:textSize="17sp"
                android:id="@+id/textView3"
                android:layout_marginLeft="@dimen/fab_margin"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/imageView3" />


            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="22 °C"
                android:id="@+id/textView5"
                android:layout_marginRight="@dimen/fab_margin"
                android:layout_centerVertical="true"
                android:layout_alignParentEnd="true"
                android:textSize="17dp" />

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/main_btn_showchart"
                android:id="@+id/btn_graph_LR"
                android:layout_below="@+id/textView4"
                android:layout_toStartOf="@+id/textView5"
                android:layout_marginRight="@dimen/fab_margin"/>


        </RelativeLayout>
        <TextView
            android:layout_width="match_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="8dp" >
            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/light_off"
                />
            <Switch
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/net_swtch_LR"
                android:textColor="@color/textcolor"
                android:enabled="true"
                android:text="@string/svetlo_obyvak"
                android:textSize="17sp"
                android:focusable="false"
                android:focusableInTouchMode="false"
                android:layout_marginLeft="@dimen/fab_margin"/>
        </LinearLayout>
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="8dp">
            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/plug_icon"
                android:id="@+id/imageView7" />

            <Switch
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/plugs"
                android:id="@+id/net_plug_LR"
                android:layout_alignParentTop="true"
                android:layout_alignParentEnd="true"
                android:layout_toEndOf="@+id/imageView7"
                android:textSize="17dp"
                android:layout_marginLeft="@dimen/fab_margin" />
        </RelativeLayout>


        <TextView
            android:layout_width="fill_parent"
            android:layout_height="5dp"
            android:background="@color/nav_back" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="@string/kuchyn"
            android:id="@+id/kuchyn" />
        <TextView
            android:layout_width="match_parent"
            android:layout_height="2dp"
            android:background="@color/nav_back" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="8dp">
            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/light_off"
                android:id="@+id/imageView5" />
            <Switch
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:id="@+id/net_mainLight_kitchen"
                android:layout_centerVertical="true"
                android:layout_alignParentEnd="true"
                android:layout_toEndOf="@+id/imageView5"
                android:checked="false"
                android:text="@string/main_light"
                android:textSize="17dp"
                android:layout_marginLeft="@dimen/fab_margin" />
        </RelativeLayout>


        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="8dp">
            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/light_off"
                android:id="@+id/imageView6" />

            <Switch
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/light_sideboard"
                android:id="@+id/net_sideboardLight_kitchen"
                android:layout_alignParentTop="true"
                android:layout_alignParentEnd="true"
                android:layout_toEndOf="@+id/imageView6"
                android:textSize="17dp"
                android:layout_marginLeft="@dimen/fab_margin" />
        </RelativeLayout>


        <TextView
            android:layout_width="fill_parent"
            android:layout_height="5dp"
            android:background="@color/nav_back" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="@string/vchod"
            android:id="@+id/vchod" />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="2dp"
            android:background="@color/nav_back" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/door"
                android:id="@+id/label2"
                android:layout_marginTop="7dp"
                android:layout_marginLeft="7dp" />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/door"
                android:textColor="@color/white"
                android:textSize="17sp"
                android:layout_toRightOf="@id/label2"
                android:layout_toEndOf="@id/label2"
                android:layout_alignParentRight="false"
                android:layout_alignParentLeft="false"
                android:layout_alignParentTop="false"
                android:layout_alignWithParentIfMissing="false"
                android:layout_alignParentBottom="false"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="@dimen/fab_margin"/>

            <ToggleButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="New toogleButton"
                android:id="@+id/door_enter"
                android:layout_alignParentRight="true"
                android:textOn="Lock"
                android:textOff="Unlock" />

        </RelativeLayout>
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/alarm_48"
                android:id="@+id/label3"
                android:layout_marginTop="7dp"
                android:layout_marginLeft="7dp" />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="Alarm"
                android:textColor="@color/white"
                android:textSize="17sp"
                android:layout_alignWithParentIfMissing="false"
                android:layout_marginLeft="@dimen/fab_margin"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/label3" />

            <ToggleButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="New ToggleButton"
                android:id="@+id/net_alarm_entry"
                android:layout_alignParentRight="true"
                android:textOn="On"
                android:textOff="Off"
                />

        </RelativeLayout>






        <TextView
            android:layout_width="fill_parent"
            android:layout_height="5dp"
            android:background="@color/nav_back" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="@string/zahrada"
            android:id="@+id/zahrada"
            />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="2dp"
            android:background="@color/nav_back" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/camera_48"
                android:id="@+id/label"
                android:layout_marginTop="7dp"
                android:layout_marginLeft="7dp" />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/kamera"
                android:textColor="@color/white"
                android:textSize="17sp"
                android:layout_toRightOf="@id/label"
                android:layout_toEndOf="@id/label"
                android:layout_alignParentRight="false"
                android:layout_alignParentLeft="false"
                android:layout_alignParentTop="false"
                android:layout_alignWithParentIfMissing="false"
                android:layout_alignParentBottom="false"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="@dimen/fab_margin" />

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Watch"
                android:id="@+id/btn_watch"
                android:layout_alignParentRight="true"
                />

        </RelativeLayout>

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginBottom="7dp">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:scaleType="fitCenter"
                android:src="@drawable/tempture"
                android:id="@+id/imageView4"
                android:layout_marginTop="7dp"
                android:layout_marginLeft="7dp"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:gravity="center"
                android:text="@string/tempeture"
                android:textColor="@color/white"
                android:textSize="17sp"
                android:layout_marginLeft="@dimen/fab_margin"
                android:layout_alignBottom="@+id/main_txt_currenttemp"
                android:layout_toEndOf="@+id/imageView4"
                android:id="@+id/textView6" />


            <ImageView

                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/cold1"
                android:layout_marginRight="20dp"
                android:id="@+id/img_currenttemp"
                android:layout_centerVertical="true"
                android:layout_toStartOf="@+id/main_txt_currenttemp"
                android:layout_marginEnd="17dp" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="18 °C"
                android:id="@+id/main_txt_currenttemp"
                android:layout_marginRight="@dimen/fab_margin"
                android:layout_alignBottom="@+id/imageView4"
                android:layout_alignParentEnd="true"
                android:textSize="17dp" />

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/main_btn_showchart"
                android:id="@+id/btn_graph_garden"
                android:layout_centerVertical="true"
                android:layout_toStartOf="@+id/img_currenttemp"
                android:layout_marginRight="@dimen/fab_margin"/>

        </RelativeLayout>

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="5dp"
            android:background="@color/nav_back" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="@string/garaz"
            android:id="@+id/garaz" />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="2dp"
            android:background="@color/nav_back" />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="8dp" >
            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/vrata"
                />
            <Switch
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/gate"
                android:textColor="@color/white"
                android:enabled="true"
                android:text="Gate"
                android:textSize="17sp"
                android:focusable="false"
                android:focusableInTouchMode="false"

                android:layout_marginLeft="@dimen/fab_margin"/>
        </LinearLayout>

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0.2dp"
            android:background="@color/gray" />

    </LinearLayout>

</ScrollView>

