Merge "[Setup] Use SetupWizardLayout"

This commit is contained in:
Maurice Lam
2015-04-22 17:36:49 +00:00
committed by Android (Google) Code Review
31 changed files with 355 additions and 1084 deletions

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.setupwizardlib.SetupWizardListLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
settings:suwBackgroundTile="@drawable/setup_illustration_tile"
settings:suwHeaderText="@string/wifi_setup_wizard_title"
settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen" />

View File

@@ -15,70 +15,82 @@
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.setupwizardlib.SetupWizardLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- header text ('Enter Pin') -->
<TextView android:id="@+id/headerText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:lines="2"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<!-- Password entry field -->
<EditText android:id="@+id/password_entry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dip"
android:layout_marginEnd="30dip"
android:gravity="center"
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoExtractUi"
android:textSize="24sp"
style="@style/TextAppearance.PasswordEntry"/>
<!-- Spacer between password entry and keyboard -->
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
settings:suwBackgroundTile="@drawable/setup_illustration_tile"
settings:suwHeaderText="@string/wifi_setup_wizard_title"
settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
style="@style/SecurityPreferenceButtonContainer">
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- left : cancel -->
<Button android:id="@+id/cancel_button"
android:layout_width="0dip"
<!-- header text ('Enter Pin') -->
<TextView android:id="@+id/headerText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpassword_cancel_label"
style="@style/SecurityPreferenceButton"/>
android:gravity="center"
android:lines="2"
android:textAppearance="?android:attr/textAppearanceMedium"/>
<!-- right : continue -->
<Button android:id="@+id/next_button"
android:layout_width="0dip"
<!-- Password entry field -->
<EditText android:id="@+id/password_entry"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpassword_continue_label"
style="@style/SecurityPreferenceButton"/>
android:layout_gravity="center"
android:layout_marginStart="30dip"
android:layout_marginEnd="30dip"
android:gravity="center"
android:inputType="textPassword"
android:imeOptions="actionNext|flagNoExtractUi"
android:textSize="24sp"
style="@style/TextAppearance.PasswordEntry"/>
<!-- Spacer between password entry and keyboard -->
<View
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
style="@style/SecurityPreferenceButtonContainer">
<!-- left : cancel -->
<Button android:id="@+id/cancel_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpassword_cancel_label"
style="@style/SecurityPreferenceButton"/>
<!-- right : continue -->
<Button android:id="@+id/next_button"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpassword_continue_label"
style="@style/SecurityPreferenceButton"/>
</LinearLayout>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"/>
</LinearLayout>
<!-- Alphanumeric keyboard -->
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00000000"
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
android:visibility="gone"/>
</LinearLayout>
</com.android.setupwizardlib.SetupWizardLayout>

View File

@@ -15,80 +15,91 @@
limitations under the License.
-->
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
<com.android.setupwizardlib.SetupWizardLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topLayout"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
settings:suwBackgroundTile="@drawable/setup_illustration_tile"
settings:suwHeaderText="@string/wifi_setup_wizard_title"
settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
settings:suwIllustrationImage="@drawable/setup_illustration_lock_screen">
<!-- takes up all space above button bar at bottom -->
<LinearLayout
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView android:id="@+id/headerText"
<!-- takes up all space above button bar at bottom -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50dp"
android:textSize="18sp"/>
android:orientation="vertical">
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
<TextView android:id="@+id/headerText"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50dip"
android:textSize="18sp"/>
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="4"
android:background="@color/lock_pattern_background"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="4"
android:background="@color/lock_pattern_background"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button android:id="@+id/retryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lockpattern_retry_button_text"/>
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView android:id="@+id/footerText"
android:layout_width="wrap_content"
<Button android:id="@+id/retryButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lockpattern_retry_button_text"/>
<TextView android:id="@+id/footerText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="50dip"
android:textSize="14sp"/>
</LinearLayout>
<!-- Buttons are hidden during setup, and use the buttons in setup navigation bar instead -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="50dp"
android:textSize="14sp"/>
android:orientation="horizontal"
android:visibility="gone"
style="@style/SecurityPreferenceButtonContainer">
</LinearLayout>
<!-- left : cancel, or re-try -->
<Button android:id="@+id/footerLeftButton"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpattern_tutorial_cancel_label"
style="@style/SecurityPreferenceButton"/>
<!-- Buttons are hidden during setup, and use the buttons in setup navigation bar instead -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
style="@style/SecurityPreferenceButtonContainer">
<!-- right : confirm or ok -->
<Button android:id="@+id/footerRightButton"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpattern_tutorial_continue_label"
style="@style/SecurityPreferenceButton"/>
<!-- left : cancel, or re-try -->
<Button android:id="@+id/footerLeftButton"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpattern_tutorial_cancel_label"
style="@style/SecurityPreferenceButton"/>
</LinearLayout>
<!-- right : confirm or ok -->
<Button android:id="@+id/footerRightButton"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lockpattern_tutorial_continue_label"
style="@style/SecurityPreferenceButton"/>
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
</LinearLayout>
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
</com.android.setupwizardlib.SetupWizardLayout>

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.android.settings.widget.StickyHeaderListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:cacheColorHint="@android:color/transparent"
android:clipToPadding="false"
android:drawSelectorOnTop="false"
android:headerDividersEnabled="false"
android:scrollbarAlwaysDrawVerticalTrack="true" />
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
android:id="@+id/navigation_bar"
style="@style/setup_wizard_navbar_style" />
</LinearLayout>

View File

@@ -20,6 +20,6 @@
android:layout_height="wrap_content"
android:paddingTop="6dip"
android:paddingBottom="6dip"
android:paddingStart="@dimen/setup_wizard_margin_sides"
android:paddingEnd="@dimen/setup_wizard_margin_sides"
android:paddingStart="@dimen/suw_layout_margin_sides"
android:paddingEnd="@dimen/suw_layout_margin_sides"
android:text="@string/unlock_setup_wizard_fingerprint_details" />

View File

@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:id="@+id/bottom_scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false">
<com.android.settings.widget.SetupWizardIllustration
android:id="@+id/setup_illustration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/setup_wizard_title_area_elevation"
android:background="@drawable/setup_illustration_bg"
android:foreground="@drawable/setup_illustration"
android:tag="stickyContainer"
settings:aspectRatio="2.22">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="sticky"
android:text="@string/wifi_setup_title"
style="@style/SetupTitle"/>
</com.android.settings.widget.SetupWizardIllustration>
<FrameLayout
android:id="@+id/setup_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/setup_illustration"
android:clipChildren="false"/>
</RelativeLayout>
</ScrollView>
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
android:id="@+id/navigation_bar"
android:layout_width="match_parent"
android:layout_height="56dip"
style="@style/setup_wizard_navbar_style"/>
</LinearLayout>

View File

@@ -19,6 +19,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/setup_wizard_margin_top"
android:paddingStart="@dimen/setup_wizard_margin_sides"
android:paddingEnd="@dimen/setup_wizard_margin_sides"
android:paddingStart="@dimen/suw_layout_margin_sides"
android:paddingEnd="@dimen/suw_layout_margin_sides"
android:textAppearance="@style/TextAppearance.SetupWizardDescription" />

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.setupwizardlib.SetupWizardListLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
settings:suwBackgroundTile="@drawable/setup_illustration_tile"
settings:suwHeaderText="@string/wifi_setup_wizard_title"
settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
settings:suwIllustrationImage="@drawable/setup_illustration_wifi" />

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.settings.widget.SetupWizardIllustration
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:id="@+id/setup_illustration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/setup_illustration_bg"
android:elevation="@dimen/setup_wizard_title_area_elevation"
android:foreground="@drawable/setup_illustration"
android:tag="stickyContainer"
settings:aspectRatio="2.22">
<TextView
android:id="@+id/title"
style="@style/SetupTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:tag="sticky"
android:text="@string/wifi_setup_wizard_title"/>
</com.android.settings.widget.SetupWizardIllustration>