• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18              android:orientation="vertical"
19              android:layout_width="match_parent"
20              android:layout_height="match_parent">
21
22    <LinearLayout
23            android:orientation="horizontal"
24            android:layout_width="match_parent"
25            android:layout_height="wrap_content"
26            android:layout_margin="4dp">
27
28        <TextView
29                android:layout_width="wrap_content"
30                android:layout_height="wrap_content"
31                android:layout_marginRight="20dp"
32                android:text="Wifi:" />
33
34        <Button android:id="@+id/startWifi"
35                android:layout_width="wrap_content"
36                android:layout_height="wrap_content"
37                android:layout_marginRight="5dp"
38                android:text="Start" />
39
40        <Button android:id="@+id/stopWifi"
41                android:layout_width="wrap_content"
42                android:layout_height="wrap_content"
43                android:layout_marginRight="20dp"
44                android:text="Stop" />
45
46        <TextView
47                android:id="@+id/wifiStatusPolled"
48                android:layout_width="wrap_content"
49                android:layout_height="wrap_content" />
50    </LinearLayout>
51
52    <LinearLayout
53            android:orientation="horizontal"
54            android:layout_width="match_parent"
55            android:layout_height="wrap_content"
56            android:layout_margin="4dp">
57
58        <TextView
59                android:layout_width="wrap_content"
60                android:layout_height="wrap_content"
61                android:layout_marginRight="20dp"
62                android:text="Tethering:" />
63
64        <Button android:id="@+id/startTethering"
65                android:layout_width="wrap_content"
66                android:layout_height="wrap_content"
67                android:layout_marginRight="5dp"
68                android:text="Start" />
69
70        <Button android:id="@+id/stopTethering"
71                android:layout_width="wrap_content"
72                android:layout_height="wrap_content"
73                android:layout_marginRight="20dp"
74                android:text="Stop" />
75
76        <TextView
77                android:id="@+id/tetheringStatus"
78                android:layout_width="wrap_content"
79                android:layout_height="wrap_content"
80                android:layout_marginRight="5dp" />
81
82        <TextView
83                android:id="@+id/tetheringStatusPolled"
84                android:layout_width="wrap_content"
85                android:layout_height="wrap_content" />
86    </LinearLayout>
87
88    <LinearLayout
89            android:orientation="horizontal"
90            android:layout_width="match_parent"
91            android:layout_height="wrap_content"
92            android:layout_margin="4dp">
93
94        <TextView
95                android:layout_width="wrap_content"
96                android:layout_height="wrap_content"
97                android:layout_marginRight="20dp"
98                android:text="LocalOnly:" />
99
100        <Button android:id="@+id/startLocalOnly"
101                android:layout_width="wrap_content"
102                android:layout_height="wrap_content"
103                android:layout_marginRight="5dp"
104                android:text="Start" />
105
106        <Button android:id="@+id/stopLocalOnly"
107                android:layout_width="wrap_content"
108                android:layout_height="wrap_content"
109                android:layout_marginRight="20dp"
110                android:text="Stop" />
111
112        <TextView
113                android:id="@+id/localOnlyStatus"
114                android:layout_width="wrap_content"
115                android:layout_height="wrap_content" />
116    </LinearLayout>
117
118    <!-- List(s) of networks (right now only have view all, may do a search UI)
119    -->
120    <LinearLayout
121            android:orientation="vertical"
122            android:layout_width="match_parent"
123            android:layout_height="match_parent">
124
125        <!-- Header for table -->
126        <LinearLayout
127                android:orientation="horizontal"
128                android:layout_width="match_parent"
129                android:layout_height="wrap_content"
130                android:paddingLeft="4dp"
131                android:background="#3C3F41"
132                android:weightSum="12">
133
134            <TextView
135                android:layout_width="0dp"
136                android:layout_height="wrap_content"
137                android:layout_weight="1"
138                android:textSize="32sp"
139                android:textColor="#d4d4d4"
140                android:textStyle="bold"
141                android:text="Net ID">
142            </TextView>
143
144            <TextView
145                android:layout_width="0dp"
146                android:layout_height="wrap_content"
147                android:layout_weight="9"
148                android:textSize="32sp"
149                android:textColor="#d4d4d4"
150                android:textStyle="bold"
151                android:text="Details">
152            </TextView>
153
154            <TextView
155                android:layout_width="0dp"
156                android:layout_height="wrap_content"
157                android:layout_weight="2"
158                android:textSize="32sp"
159                android:textColor="#d4d4d4"
160                android:textStyle="bold"
161                android:text="Functions">
162            </TextView>
163
164        </LinearLayout>
165
166        <!-- Wrapped list view to implement swipe to refresh -->
167        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
168            android:id="@+id/refreshNetworksList"
169            android:layout_width="match_parent"
170            android:layout_height="wrap_content">
171
172            <!-- Filled in code with network_item.xml -->
173            <ListView
174                    android:id="@+id/networks"
175                    android:layout_width="match_parent"
176                    android:layout_height="wrap_content">
177            </ListView>
178
179        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
180
181    </LinearLayout>
182
183    <LinearLayout
184        android:orientation="horizontal"
185        android:layout_width="wrap_content"
186        android:layout_height="wrap_content"
187        android:layout_margin="4dp">
188        <Button android:id="@+id/networkEnableWifiIntent"
189                android:layout_width="wrap_content"
190                android:layout_height="wrap_content"
191                android:text="Enable Wifi Intent"/>
192        <Button android:id="@+id/networkDisableWifiIntent"
193                android:layout_width="wrap_content"
194                android:layout_height="wrap_content"
195                android:text="Disable Wifi Intent"/>
196    </LinearLayout>
197
198    <LinearLayout
199        android:orientation="horizontal"
200        android:layout_width="wrap_content"
201        android:layout_height="wrap_content"
202        android:layout_margin="4dp">
203        <Button android:id="@+id/networkEnableBluetoothIntent"
204                android:layout_width="wrap_content"
205                android:layout_height="wrap_content"
206                android:text="Enable Bluetooth Intent"/>
207        <Button android:id="@+id/networkDisableBluetoothIntent"
208                android:layout_width="wrap_content"
209                android:layout_height="wrap_content"
210                android:text="Disable Bluetooth Intent"/>
211        <Button android:id="@+id/networkDiscoverableBluetoothIntent"
212                android:layout_width="wrap_content"
213                android:layout_height="wrap_content"
214                android:text="Discoverable Bluetooth Intent"/>
215    </LinearLayout>
216
217</LinearLayout>
218