1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
        <ImageView
            android:id="@+id/on_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/on"
            android:visibility="visible" />
 
        <ImageView
            android:id="@+id/off_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/off"
            android:visibility="invisible" />
 
 
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
        on_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                on_btn.setVisibility(View.GONE);
                off_btn.setVisibility(View.VISIBLE);
                state.setWi(false);
            }
        });
        off_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                off_btn.setVisibility(View.GONE);
                on_btn.setVisibility(View.VISIBLE);
                state.setWi(true);
            }
        });
cs


' IOT 기반 응용 SW과정 > Review' 카테고리의 다른 글

멀티캠퍼스의 점심메뉴  (0) 2016.09.25
jQuery css  (0) 2016.08.03
jQuery select option value  (0) 2016.07.26
jsp 마우스 액션  (0) 2016.07.07
CSS 반응형 웹 디자인  (0) 2016.06.21

+ Recent posts