Page 1100 - 3-2
P. 1100

@Override
                protected void onStop() {
                    // TODO Auto-generated method stub
                    super.onStop();
                    try {
                        socket.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }




            -------------------activity_appliance.xml---------------------


            <?xml version="1.0" encoding="utf-8"?>
            <LinearLayout 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="kr.icehs.intec.mdp_0525.ApplianceActivity">


                <LinearLayout
                    android:layout_width="368dp"
                    android:layout_height="495dp"
                    android:orientation="vertical"
                    android:weightSum="1"
                    tools:layout_editor_absoluteX="8dp"
                    tools:layout_editor_absoluteY="8dp">


                    <Switch
                        android:id="@+id/switch1"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.19"
                        android:text="Curtain"
                        android:textSize="20dp"
                        tools:ignore="HardcodedText" />


                    <Switch
                        android:id="@+id/switch2"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"


                                                        - 1100 -
   1095   1096   1097   1098   1099   1100   1101   1102   1103   1104   1105