25ce793978fadf4b0599f59094301829da4c7cec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / samples / android / sample_service / res / layout / activity_main.xml
1 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2     xmlns:tools="http://schemas.android.com/tools"
3     android:layout_width="match_parent"
4     android:layout_height="match_parent"
5     android:paddingBottom="@dimen/activity_vertical_margin"
6     android:paddingLeft="@dimen/activity_horizontal_margin"
7     android:paddingRight="@dimen/activity_horizontal_margin"
8     android:paddingTop="@dimen/activity_vertical_margin"
9     tools:context="org.iotivity.service.MainActivity" >
10
11     <RelativeLayout
12         android:id="@+id/sample_service_layout"
13         android:layout_width="fill_parent"
14         android:layout_height="wrap_content"
15         android:layout_alignParentTop="true"
16         android:background="#cccccc" >
17
18         <LinearLayout
19             android:id="@+id/layout_mode"
20             android:layout_width="fill_parent"
21             android:layout_height="wrap_content"
22             android:layout_alignParentTop="true"
23             android:orientation="horizontal" >
24
25             <TextView
26                 android:layout_width="wrap_content"
27                 android:layout_height="wrap_content" />
28
29             <TextView
30                 android:id="@+id/tv_mode"
31                 android:layout_width="fill_parent"
32                 android:layout_height="wrap_content" />
33         </LinearLayout>
34
35         <RelativeLayout
36             android:id="@+id/layout_network"
37             android:layout_width="fill_parent"
38             android:layout_height="wrap_content"
39             android:layout_below="@id/layout_mode"
40             android:orientation="horizontal" >
41
42             <TextView
43                 android:layout_width="wrap_content"
44                 android:layout_height="wrap_content" />
45
46             <TextView
47                 android:id="@+id/tv_network"
48                 android:layout_width="fill_parent"
49                 android:layout_height="wrap_content" />
50         </RelativeLayout>
51
52         <RelativeLayout
53             android:id="@+id/layout_find_title"
54             android:layout_width="fill_parent"
55             android:layout_height="wrap_content"
56             android:layout_below="@id/layout_mode" >
57                         
58             <TextView
59                 android:id="@+id/tv_find"
60                 android:layout_width="fill_parent"
61                 android:layout_height="wrap_content"
62                 android:text="[Find Resource]"
63                 />
64
65          </RelativeLayout>
66
67         <RelativeLayout
68             android:id="@+id/layout_find"
69             android:layout_width="fill_parent"
70             android:layout_height="wrap_content"
71             android:layout_below="@id/layout_find_title" >
72
73             <Button
74                 android:id="@+id/btn_find_resource"
75                 android:layout_width="wrap_content"
76                 android:layout_height="wrap_content"
77                 android:layout_alignParentRight="true"
78                 android:text="@string/find" />
79
80             <EditText
81                 android:id="@+id/et_uri"
82                 android:layout_width="fill_parent"
83                 android:layout_height="wrap_content"
84                 android:layout_centerVertical="true"
85                 android:layout_toLeftOf="@id/btn_find_resource"
86                 android:text="@string/uri" />
87         </RelativeLayout>
88
89         <RelativeLayout
90             android:id="@+id/layout_Response_Noti_title"
91             android:layout_width="fill_parent"
92             android:layout_height="wrap_content"
93             android:layout_below="@id/layout_mode" >
94
95             <TextView
96                 android:id="@+id/tv_Response_Noti"
97                 android:layout_width="fill_parent"
98                 android:layout_height="wrap_content"
99                 android:text="[Send Response / Send Notification]"
100                 />
101
102         </RelativeLayout>
103
104         <RelativeLayout
105             android:id="@+id/layout_request_setting_for_server"
106             android:layout_width="fill_parent"
107             android:layout_height="wrap_content"
108             android:layout_below="@id/layout_Response_Noti_title" >
109
110             <Button
111                 android:id="@+id/btn_Request_setting_for_server"
112                 android:layout_width="fill_parent"
113                 android:layout_height="wrap_content"
114                 android:layout_alignParentRight="true"
115                 android:text="@string/request_setting" />
116         </RelativeLayout>
117
118         <RelativeLayout
119             android:id="@+id/layout_notify"
120             android:layout_width="fill_parent"
121             android:layout_height="wrap_content"
122             android:layout_below="@id/layout_request_setting_for_server" >
123
124             <EditText
125                 android:id="@+id/et_notification"
126                 android:layout_width="fill_parent"
127                 android:layout_height="wrap_content"
128                 android:layout_alignParentRight="true"
129                 android:text="@string/notification" />
130         </RelativeLayout>
131
132         <RelativeLayout
133             android:id="@+id/layout_payload_server_ed"
134             android:layout_width="fill_parent"
135             android:layout_height="wrap_content"
136             android:layout_below="@id/layout_notify" >
137
138             <EditText
139                 android:id="@+id/et_payload_data_for_server"
140                 android:layout_width="fill_parent"
141                 android:layout_height="wrap_content"
142                 android:layout_centerVertical="true"
143                 android:text="@string/payload_data_server" />
144
145         </RelativeLayout>
146
147         <RelativeLayout
148             android:id="@+id/layout_server_bt"
149             android:layout_width="fill_parent"
150             android:layout_height="wrap_content"
151             android:layout_below="@id/layout_payload_server_ed" >
152
153             <Button
154                 android:id="@+id/btn_notify"
155                 android:layout_width="wrap_content"
156                 android:layout_height="wrap_content"
157                 android:layout_alignParentRight="true"
158                 android:text="@string/notify" />
159
160             <Button
161                 android:id="@+id/btn_sendresponse"
162                 android:layout_width="fill_parent"
163                 android:layout_height="wrap_content"
164                 android:layout_toLeftOf="@id/btn_notify"
165                 android:text="@string/sendresponse" />
166         </RelativeLayout>
167
168         <RelativeLayout
169             android:id="@+id/layout_advertise_title"
170             android:layout_width="fill_parent"
171             android:layout_height="wrap_content"
172             android:layout_below="@id/layout_server_bt" >
173
174             <TextView
175                 android:id="@+id/tv_advertise"
176                 android:layout_width="fill_parent"
177                 android:layout_height="wrap_content"
178                 android:text="[Advertise Resource]"
179                 />
180
181          </RelativeLayout>
182
183         <RelativeLayout
184             android:id="@+id/layout_advertise_resource"
185             android:layout_width="fill_parent"
186             android:layout_height="wrap_content"
187             android:layout_below="@id/layout_advertise_title" >
188
189             <Button
190                 android:id="@+id/btn_advertise"
191                 android:layout_width="wrap_content"
192                 android:layout_height="wrap_content"
193                 android:layout_alignParentRight="true"
194                 android:text="@string/advertise" />
195
196             <EditText
197                 android:id="@+id/et_uri_advertise"
198                 android:layout_width="fill_parent"
199                 android:layout_height="wrap_content"
200                 android:layout_toLeftOf="@id/btn_advertise"
201                 android:text="@string/uri" />
202         </RelativeLayout>
203
204         <RelativeLayout
205             android:id="@+id/layout_request_title"
206             android:layout_width="fill_parent"
207             android:layout_height="wrap_content"
208             android:layout_below="@id/layout_find" >
209
210             <TextView
211                 android:id="@+id/tv_request"
212                 android:layout_width="fill_parent"
213                 android:layout_height="wrap_content"
214                 android:text="[Send Request]" />
215
216          </RelativeLayout>
217
218         <RelativeLayout
219             android:id="@+id/layout_request"
220             android:layout_width="fill_parent"
221             android:layout_height="wrap_content"
222             android:layout_below="@id/layout_request_title" >
223
224             <EditText
225                 android:id="@+id/et_req_data"
226                 android:layout_width="fill_parent"
227                 android:layout_height="wrap_content"
228                 android:layout_centerVertical="true"
229                 android:text="@string/req_data" />
230         </RelativeLayout>
231
232         <RelativeLayout
233             android:id="@+id/layout_payload_client_ed"
234             android:layout_width="fill_parent"
235             android:layout_height="wrap_content"
236             android:layout_below="@id/layout_request" >
237
238             <EditText
239                 android:id="@+id/et_payload_data"
240                 android:layout_width="fill_parent"
241                 android:layout_height="wrap_content"
242                 android:layout_centerVertical="true"
243                 android:text="@string/payload_data_client" />
244         </RelativeLayout>
245
246         <RelativeLayout
247             android:id="@+id/layout_request_setting_for_client"
248             android:layout_width="fill_parent"
249             android:layout_height="wrap_content"
250             android:layout_below="@id/layout_payload_client_ed" >
251
252             <Button
253                 android:id="@+id/btn_Request"
254                 android:layout_width="wrap_content"
255                 android:layout_height="wrap_content"
256                 android:layout_alignParentRight="true"
257                 android:text="@string/request" />
258
259             <Button
260                 android:id="@+id/btn_Request_setting_for_client"
261                 android:layout_width="fill_parent"
262                 android:layout_height="wrap_content"
263                 android:layout_toLeftOf="@id/btn_Request"
264                 android:text="@string/request_setting" />
265         </RelativeLayout>
266
267         <RelativeLayout
268             android:id="@+id/layout_request_to_all_title"
269             android:layout_width="fill_parent"
270             android:layout_height="wrap_content"
271             android:layout_below="@id/layout_request_setting_for_client" >
272
273             <TextView
274                 android:id="@+id/tv_request_to_all"
275                 android:layout_width="fill_parent"
276                 android:layout_height="wrap_content" 
277                 android:text="[Send Request to All]"
278                 />
279
280          </RelativeLayout>
281
282         <RelativeLayout
283             android:id="@+id/layout_request_to_all"
284             android:layout_width="fill_parent"
285             android:layout_height="wrap_content"
286             android:layout_below="@id/layout_request_to_all_title" >
287
288             <EditText
289                 android:id="@+id/et_req_to_all_data"
290                 android:layout_width="fill_parent"
291                 android:layout_height="wrap_content"
292                 android:layout_centerVertical="true"
293                 android:text="@string/uri" />
294         </RelativeLayout>
295
296         <RelativeLayout
297             android:id="@+id/layout_request_to_all_setting_for_client"
298             android:layout_width="fill_parent"
299             android:layout_height="wrap_content"
300             android:layout_below="@id/layout_request_to_all" >
301
302             <Button
303                 android:id="@+id/btn_request_to_all"
304                 android:layout_width="wrap_content"
305                 android:layout_height="wrap_content"
306                 android:layout_alignParentRight="true"
307                 android:text="@string/request_to_all" />
308
309             <Button
310                 android:id="@+id/btn_request_to_all_setting_for_client"
311                 android:layout_width="fill_parent"
312                 android:layout_height="wrap_content"
313                 android:layout_toLeftOf="@id/btn_request_to_all"
314                 android:text="@string/request_setting" />
315         </RelativeLayout>
316
317         <RelativeLayout
318             android:id="@+id/layout_handle_title"
319             android:layout_width="fill_parent"
320             android:layout_height="wrap_content"
321             android:layout_below="@id/layout_request_to_all_setting_for_client" >
322
323             <TextView
324                 android:id="@+id/tv_handle"
325                 android:layout_width="fill_parent"
326                 android:layout_height="wrap_content"
327                 android:text="[Handle Reqeust,Response data / Get NetworkInfo]"/>
328         </RelativeLayout>
329
330         <RelativeLayout
331             android:id="@+id/layout_receive"
332             android:layout_width="fill_parent"
333             android:layout_height="wrap_content"
334             android:layout_below="@id/layout_handle_title" >
335
336             <Button
337                 android:id="@+id/btn_get_network_info"
338                 android:layout_width="wrap_content"
339                 android:layout_height="wrap_content"
340                 android:layout_alignParentRight="true"
341                 android:text="@string/get_network_info" />
342             <Button
343                 android:id="@+id/btn_receive"
344                 android:layout_width="fill_parent"
345                 android:layout_height="wrap_content"
346                 android:layout_toLeftOf="@id/btn_get_network_info"
347                 android:text="@string/receive" />
348         </RelativeLayout>
349     </RelativeLayout>
350
351     <ScrollView
352         android:id="@+id/sv_result_scoll"
353         android:layout_width="fill_parent"
354         android:layout_height="fill_parent"
355         android:layout_below="@id/sample_service_layout"
356         android:layout_marginTop="10pt" >
357
358         <TextView
359             android:id="@+id/tv_result"
360             android:layout_width="fill_parent"
361             android:layout_height="wrap_content" />
362     </ScrollView>
363
364 </RelativeLayout>