OSDN Git Service

Merge "Rename Night display to Night Light" into nyc-mr1-dev
[android-x86/packages-apps-Settings.git] / res / layout-sw600dp / wifi_settings_for_setup_wizard_xl.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2010 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 <RelativeLayout
18     android:id="@+id/layout_root"
19     xmlns:android="http://schemas.android.com/apk/res/android"
20     android:orientation="horizontal"
21     android:layout_width="fill_parent"
22     android:layout_height="fill_parent"
23     android:paddingTop="60dip"
24     android:paddingStart="@dimen/screen_margin_sides"
25     android:paddingEnd="@dimen/screen_margin_sides"
26     android:paddingBottom="0dip" >
27
28     <FrameLayout
29         android:id="@+id/top_padding_layout"
30         android:layout_width="match_parent"
31         android:layout_height="wrap_content"
32         android:layout_alignParentTop="true">
33         <!-- Set to gone when software keyboard appears -->
34         <View
35              android:id="@+id/top_padding"
36              android:layout_width="match_parent"
37              android:layout_height="94dip" />
38     </FrameLayout>
39
40     <TextView
41         android:id="@+id/wifi_setup_title"
42         android:layout_width="wrap_content"
43         android:layout_height="wrap_content"
44         android:minHeight="48dip"
45         android:layout_alignParentStart="true"
46         android:layout_centerVertical="true"
47         android:layout_marginStart="16dip"
48         android:layout_below="@id/top_padding_layout"
49         android:textSize="32dip"
50         android:textColor="@color/title_color"
51         android:text="@string/wifi_setup_title"
52         android:gravity="bottom"/>
53
54     <!-- Divider -->
55     <FrameLayout
56         android:id="@+id/top_divider"
57         android:layout_width="match_parent"
58         android:layout_height="wrap_content"
59         android:layout_below="@id/wifi_setup_title">
60         <ProgressBar
61             android:id="@+id/scanning_progress_bar"
62             android:layout_width="match_parent"
63             android:layout_height="wrap_content"
64             style="?android:attr/progressBarStyleHorizontal" />
65         <View
66             android:id="@+id/top_divider_no_progress"
67             android:layout_width="match_parent"
68             android:layout_height="3dip"
69             android:layout_marginTop="6dip"
70             android:layout_marginBottom="0dip"
71             android:background="@color/divider_color"
72             android:visibility="gone" />
73     </FrameLayout>
74
75     <!-- Dummy view to have the left edge of following Views.
76          @id/content needs to have layout_width="match_parent" to accommodate
77          every views inside @id/wifi_config_ui while sometimes config ui becomes
78          very wide. -->
79     <View
80         android:id="@+id/dummy_for_left_edge"
81         android:layout_width="716dip"
82         android:layout_height="0dip"
83         android:layout_below="@id/top_divider"
84         android:layout_centerHorizontal="true" />
85
86     <RelativeLayout
87         android:id="@+id/content"
88         android:layout_width="match_parent"
89         android:layout_height="wrap_content"
90         android:layout_below="@id/top_divider"
91         android:layout_alignStart="@id/dummy_for_left_edge"
92         android:layout_centerHorizontal="true">
93
94         <!-- Padding for @id/content shown when keyboard isn't available -->
95         <View
96             android:id="@+id/content_padding"
97             android:layout_width="match_parent"
98             android:layout_height="370dip"
99             android:visibility="gone" />
100
101         <FrameLayout
102             android:id="@+id/wifi_settings_fragment_layout"
103             android:layout_width="716dip"
104             android:layout_height="377dip">
105             <fragment
106                 class="com.android.settings.wifi.WifiSettings"
107                 android:id="@+id/wifi_setup_fragment"
108                 android:layout_width="match_parent"
109                 android:layout_height="wrap_content" />
110         </FrameLayout>
111         <FrameLayout
112             android:id="@+id/wifi_config_ui"
113             android:layout_width="wrap_content"
114             android:minWidth="406dip"
115             android:layout_height="wrap_content"
116             android:minHeight="160dip"
117             android:layout_marginTop="10dip"
118             android:layout_alignParentStart="true"
119             android:visibility="gone" />
120         <LinearLayout
121             android:id="@+id/connecting_status_layout"
122             android:layout_width="716dip"
123             android:layout_height="360dip"
124             android:layout_marginTop="10dip"
125             android:visibility="gone">
126             <TextView
127                 android:id="@+id/connecting_status"
128                 android:layout_width="match_parent"
129                 android:layout_height="wrap_content"
130                 android:lineSpacingExtra="10dip"
131                 android:textAppearance="?android:attr/textAppearanceMedium"
132                 android:textSize="20sp" />
133         </LinearLayout>
134
135     </RelativeLayout>
136
137     <!-- Shown when @id/top_divider is using View instead of ProgressBar.
138          We need this padding to place @id/bottom_divider at the same position
139          regardless of @id/top_divider state.
140
141          Detail:
142          When ProgressBar is used in @id/top_divider, we have 7dip implicit
143          padding inside the ProgressBar object, while we don't have the
144          padding when View is used. As a result, all the objects below it
145          including @id/bottom_divider moves up/down in 7dip between those
146          two states. It is WAI for @id/content, but not for the others.
147
148          Note that we cannot let bottom dividers/buttons align with parent's
149          bottom edge using layout_alignParentBottom="true", since we'd like
150          to control bottom margin between @id/bottom_buttons and the edge
151          depending on software keyboard is shown/hidden.
152
153          We need to enclose @id/bottom_padding with @id/bottom_padding_layout
154          to let @id/bottom_divider use android:layout_below.
155          android:visibility="gone" really let the object go away,
156          causing @id/bottom_divider to lose the target for android:layout_below.
157       -->
158     <FrameLayout
159         android:id="@+id/bottom_padding_layout"
160         android:layout_width="match_parent"
161         android:layout_height="wrap_content"
162         android:layout_below="@id/content">
163         <View
164              android:id="@+id/bottom_padding"
165              android:layout_width="match_parent"
166              android:layout_height="7dip"
167              android:visibility="gone" />
168     </FrameLayout>
169
170     <!-- Divider -->
171     <View
172         android:id="@+id/bottom_divider"
173         android:layout_width="match_parent"
174         android:layout_height="3dip"
175         android:layout_marginBottom="16dip"
176         android:layout_below="@id/bottom_padding_layout"
177         android:layout_alignStart="@id/content"
178         android:background="@color/divider_color" />  <!-- TODO: fix this -->
179
180     <LinearLayout
181         android:id="@+id/bottom_buttons"
182         android:orientation="vertical"
183         android:layout_width="match_parent"
184         android:layout_height="wrap_content"
185         android:layout_below="@id/bottom_divider"
186         android:layout_alignStart="@id/bottom_divider">
187
188         <RelativeLayout
189             android:layout_width="match_parent"
190             android:layout_height="wrap_content"
191             android:layout_below="@id/bottom_divider"
192             android:layout_alignStart="@id/bottom_divider"
193             android:layout_alignParentEnd="true"
194             android:layout_alignParentBottom="true">
195
196             <Button
197                 android:id="@+id/wifi_setup_add_network"
198                 style="@style/setup_wizard_button"
199                 android:layout_alignParentStart="true"
200                 android:text="@string/wifi_setup_add_network"
201                 android:enabled="false" />
202
203             <LinearLayout
204                 android:layout_width="wrap_content"
205                 android:layout_height="wrap_content"
206                 android:layout_alignParentEnd="true"
207                 android:orientation="horizontal">
208
209                 <!-- This misleading name is for keeping consistency between non-XL
210                      layouts -->
211                 <Button android:id="@+id/wifi_setup_cancel"
212                         style="@style/setup_wizard_button"
213                         android:text="@string/wifi_setup_back"
214                         android:visibility="gone" />
215
216                 <Button android:id="@+id/wifi_setup_connect"
217                         style="@style/setup_wizard_button"
218                         android:layout_marginStart="16dip"
219                         android:text="@string/wifi_setup_connect"
220                         android:enabled="false"
221                         android:visibility="gone" />
222
223                 <Button android:id="@+id/wifi_setup_skip_or_next"
224                         style="@style/setup_wizard_button"
225                         android:layout_marginStart="16dip"
226                         android:text="@string/wifi_setup_skip" />
227             </LinearLayout>
228
229         </RelativeLayout>
230
231         <Button android:id="@+id/wifi_setup_refresh_list"
232                 style="@style/setup_wizard_button"
233                 android:layout_alignParentEnd="true"
234                 android:text="@string/wifi_setup_refresh_list"
235                 android:enabled="false" />
236
237     </LinearLayout>
238 </RelativeLayout>