Merge "[Setup] Use SetupWizardLayout"
This commit is contained in:
@@ -1,26 +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.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true">
|
||||
|
||||
<item android:id="@+id/illustration_image">
|
||||
<bitmap android:src="@drawable/setup_illustration_wifi"
|
||||
android:gravity="fill" />
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@@ -1,20 +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.
|
||||
-->
|
||||
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/setup_illustration_tile"
|
||||
android:tileMode="repeat" />
|
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/setup_wizard_card_corner_radius"
|
||||
android:topRightRadius="@dimen/setup_wizard_card_corner_radius" />
|
||||
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
|
||||
</shape>
|
||||
|
@@ -1,56 +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"
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/title_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/setup_illustration_bg"
|
||||
android:elevation="@dimen/setup_wizard_title_area_elevation">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/SetupTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wifi_setup_wizard_title" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ListView
|
||||
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>
|
||||
|
@@ -1,68 +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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/title_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/setup_illustration_bg"
|
||||
android:elevation="@dimen/setup_wizard_title_area_elevation">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wifi_setup_title"
|
||||
style="@style/SetupTitle"/>
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/bottom_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title_area"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:fillViewport="true">
|
||||
|
||||
<FrameLayout android:id="@+id/setup_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<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>
|
||||
|
@@ -1,78 +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"
|
||||
android:id="@+id/fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.android.settings.widget.SetupWizardIllustration
|
||||
android:id="@+id/setup_illustration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:foreground="@drawable/setup_illustration"
|
||||
android:background="@drawable/setup_illustration_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="start|top"
|
||||
android:weightSum="16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/SetupCardTitle"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
|
||||
android:layout_weight="6"
|
||||
android:text="@string/wifi_setup_wizard_title"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/setup_wizard_card_land_margin_top"
|
||||
android:layout_weight="8"
|
||||
android:background="@drawable/setup_wizard_card_bg"
|
||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.settings.widget.SetupWizardIllustration>
|
||||
|
||||
<fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
||||
android:id="@+id/navigation_bar"
|
||||
style="@style/setup_wizard_navbar_style" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -1,74 +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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.android.settings.widget.SetupWizardIllustration
|
||||
android:id="@+id/setup_illustration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/setup_illustration_bg"
|
||||
android:foreground="@drawable/setup_illustration">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="start|top"
|
||||
android:weightSum="16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
|
||||
android:layout_weight="6"
|
||||
android:text="@string/wifi_setup_title"
|
||||
style="@style/SetupCardTitle"/>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/bottom_scroll_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/setup_wizard_card_land_margin_top"
|
||||
android:layout_weight="8"
|
||||
android:background="@drawable/setup_wizard_card_bg"
|
||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||
android:fillViewport="true">
|
||||
|
||||
<FrameLayout android:id="@+id/setup_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.settings.widget.SetupWizardIllustration>
|
||||
|
||||
<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>
|
||||
|
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2014 Google Inc.
|
||||
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.android.settings.widget.SetupWizardIllustration
|
||||
android:id="@+id/setup_illustration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/setup_illustration_bg"
|
||||
android:foreground="@drawable/setup_illustration">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/setup_wizard_card_port_margin_sides"
|
||||
android:paddingRight="@dimen/setup_wizard_card_port_margin_sides">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/SetupCardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wifi_setup_wizard_title" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/setup_wizard_card_bg"
|
||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.settings.widget.SetupWizardIllustration>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_bar"
|
||||
android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
|
||||
style="@style/setup_wizard_navbar_style" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -1,74 +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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.android.settings.widget.SetupWizardIllustration
|
||||
android:id="@+id/setup_illustration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/setup_illustration_bg"
|
||||
android:foreground="@drawable/setup_illustration">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/setup_wizard_card_port_margin_sides"
|
||||
android:paddingEnd="@dimen/setup_wizard_card_port_margin_sides">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/wifi_setup_title"
|
||||
style="@style/SetupCardTitle"/>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/bottom_scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/setup_wizard_card_bg"
|
||||
android:elevation="@dimen/setup_wizard_card_elevation"
|
||||
android:fillViewport="true">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/setup_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipChildren="false"/>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.android.settings.widget.SetupWizardIllustration>
|
||||
|
||||
<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>
|
||||
|
26
res/layout/setup_choose_lock_generic.xml
Normal file
26
res/layout/setup_choose_lock_generic.xml
Normal 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" />
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
@@ -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" />
|
||||
|
@@ -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>
|
||||
|
@@ -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" />
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2014 The Android Open Source Project
|
||||
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.
|
||||
@@ -15,19 +15,12 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:autoMirrored="true">
|
||||
|
||||
<item>
|
||||
<bitmap android:src="@drawable/setup_illustration_horizontal_tile"
|
||||
android:gravity="top"
|
||||
android:tileModeX="repeat"
|
||||
android:tileModeY="disabled" />
|
||||
</item>
|
||||
|
||||
<item android:id="@+id/illustration_image">
|
||||
<bitmap android:src="@drawable/setup_illustration_wifi"
|
||||
android:gravity="top|start" />
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
<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" />
|
@@ -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>
|
@@ -45,9 +45,4 @@
|
||||
<!-- Dashboard tile image margin start / end -->
|
||||
<dimen name="dashboard_tile_image_margin_start">12dp</dimen>
|
||||
|
||||
<dimen name="setup_wizard_card_title_padding_end">32dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_start">56dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_top">24dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_bottom">0dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
@@ -24,7 +24,6 @@
|
||||
<dimen name="content_margin_left">16dip</dimen>
|
||||
<dimen name="description_margin_top">26dip</dimen>
|
||||
<dimen name="crypt_clock_size">120sp</dimen>
|
||||
<dimen name="setup_title_size">24sp</dimen>
|
||||
<dimen name="appwidget_min_width">325dip</dimen>
|
||||
<dimen name="appwidget_min_height">50dip</dimen>
|
||||
|
||||
|
@@ -38,28 +38,10 @@
|
||||
|
||||
<dimen name="crypt_clock_size">100sp</dimen>
|
||||
|
||||
<dimen name="setup_margin_bottom">0dip</dimen>
|
||||
<dimen name="setup_title_size">24sp</dimen>
|
||||
<dimen name="setup_title_margin_bottom">16dp</dimen>
|
||||
<!-- This is the extra spacing required to make the leading exactly 32sp -->
|
||||
<dimen name="setup_title_line_spacing_extra">3.67sp</dimen>
|
||||
<dimen name="setup_title_padding_bottom">2dp</dimen>
|
||||
<dimen name="setup_title_padding_top">16dp</dimen>
|
||||
<!-- Size of padding to give in the wifi list when there is no icon -->
|
||||
<dimen name="setup_list_no_icon_padding">56dp</dimen>
|
||||
<dimen name="setup_add_network_item_height">56dp</dimen>
|
||||
<dimen name="setup_wizard_card_corner_radius">2dp</dimen>
|
||||
<dimen name="setup_wizard_card_elevation">5dp</dimen>
|
||||
<dimen name="setup_wizard_tablet_illustration_height">256dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_end">0dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_start">0dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_top">16dp</dimen>
|
||||
<dimen name="setup_wizard_card_title_padding_bottom">28dp</dimen>
|
||||
<dimen name="setup_wizard_card_port_margin_sides">56dp</dimen>
|
||||
<dimen name="setup_wizard_card_land_margin_top">128dp</dimen>
|
||||
<dimen name="setup_wizard_margin_sides">40dp</dimen>
|
||||
<dimen name="setup_wizard_margin_top">24dp</dimen>
|
||||
<dimen name="setup_wizard_title_area_elevation">3dp</dimen>
|
||||
|
||||
<dimen name="divider_height">3dip</dimen>
|
||||
<dimen name="divider_margin_top">6dip</dimen>
|
||||
|
@@ -146,45 +146,6 @@
|
||||
<item name="android:clickable">false</item>
|
||||
</style>
|
||||
|
||||
<!-- We'd like to have this as 16dip hight including paddingTop/paddingBottom to
|
||||
be consistent with ProgressBar -->
|
||||
<style name="TopDivider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/divider_height</item>
|
||||
<item name="android:background">?attr/setup_divider_color</item>
|
||||
<item name="android:focusable">false</item>
|
||||
<item name="android:clickable">false</item>
|
||||
<item name="android:layout_marginTop">@dimen/divider_margin_top</item>
|
||||
<item name="android:layout_marginBottom">@dimen/divider_margin_bottom</item>
|
||||
</style>
|
||||
|
||||
<style name="SetupTitle">
|
||||
<item name="android:layout_marginBottom">@dimen/setup_title_margin_bottom</item>
|
||||
<item name="android:layout_marginEnd">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:layout_marginStart">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:clickable">false</item>
|
||||
<item name="android:fontFamily">sans-serif</item>
|
||||
<item name="android:lineSpacingExtra">@dimen/setup_title_line_spacing_extra</item>
|
||||
<item name="android:longClickable">false</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textSize">@dimen/setup_title_size</item>
|
||||
<item name="android:paddingBottom">@dimen/setup_title_padding_bottom</item>
|
||||
<item name="android:paddingTop">@dimen/setup_title_padding_top</item>
|
||||
</style>
|
||||
|
||||
<!-- Alternate title style used for some tablet layouts -->
|
||||
<style name="SetupCardTitle">
|
||||
<item name="android:paddingBottom">@dimen/setup_wizard_card_title_padding_bottom</item>
|
||||
<item name="android:paddingEnd">@dimen/setup_wizard_card_title_padding_end</item>
|
||||
<item name="android:paddingStart">@dimen/setup_wizard_card_title_padding_start</item>
|
||||
<item name="android:paddingTop">@dimen/setup_wizard_card_title_padding_top</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.SetupWizardCardTitle</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.SetupWizardCardTitle" parent="@android:style/TextAppearance.Material.Display1">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.SetupWizardDescription" parent="@android:style/TextAppearance.Material.Subhead">
|
||||
</style>
|
||||
|
||||
|
@@ -31,8 +31,8 @@
|
||||
|
||||
<style name="SetupWizardTheme" parent="SuwThemeMaterial">
|
||||
<item name="android:alertDialogTheme">@style/Theme.WifiDialog</item>
|
||||
<item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
||||
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
||||
<item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
<style name="SetupWizardTheme.Light" parent="SuwThemeMaterial.Light">
|
||||
<item name="android:alertDialogTheme">@style/Theme.Light.WifiDialog</item>
|
||||
<item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
|
||||
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
||||
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
||||
<item name="ic_menu_add">@drawable/ic_menu_add_light</item>
|
||||
|
@@ -16,8 +16,10 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizardlib.SetupWizardListLayout;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -37,8 +39,7 @@ import android.widget.ListView;
|
||||
* Other changes should be done to ChooseLockGeneric class instead and let this class inherit
|
||||
* those changes.
|
||||
*/
|
||||
public class SetupChooseLockGeneric extends ChooseLockGeneric
|
||||
implements SetupWizardNavBar.NavigationBarListener {
|
||||
public class SetupChooseLockGeneric extends ChooseLockGeneric {
|
||||
|
||||
@Override
|
||||
protected boolean isValidFragment(String fragmentName) {
|
||||
@@ -56,33 +57,16 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
bar.getNextButton().setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
}
|
||||
|
||||
public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment {
|
||||
public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment
|
||||
implements NavigationBar.NavigationBarListener {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
final View view = inflater.inflate(R.layout.setup_preference, container, false);
|
||||
ListView list = (ListView) view.findViewById(android.R.id.list);
|
||||
View title = view.findViewById(R.id.title);
|
||||
if (title == null) {
|
||||
final View header = inflater.inflate(R.layout.setup_wizard_header, list, false);
|
||||
list.addHeaderView(header, null, false);
|
||||
}
|
||||
final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
|
||||
R.layout.setup_choose_lock_generic, container, false);
|
||||
layout.setHeaderText(getActivity().getTitle());
|
||||
ListView list = layout.getListView();
|
||||
final FingerprintManager fpm = (FingerprintManager)
|
||||
getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
|
||||
if (fpm != null && fpm.isHardwareDetected()) {
|
||||
@@ -90,15 +74,18 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
||||
R.layout.setup_screen_lock_fingerprint_details, list, false);
|
||||
list.addFooterView(footer, null, false);
|
||||
}
|
||||
return view;
|
||||
|
||||
final NavigationBar navigationBar = layout.getNavigationBar();
|
||||
navigationBar.getNextButton().setEnabled(false);
|
||||
navigationBar.setNavigationBarListener(this);
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
SetupWizardUtils.setIllustration(getActivity(),
|
||||
R.drawable.setup_illustration_lock_screen);
|
||||
SetupWizardUtils.setHeaderText(getActivity(), getActivity().getTitle());
|
||||
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,5 +179,17 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
||||
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
|
||||
return intent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,9 +16,11 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizardlib.SetupWizardLayout;
|
||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -35,8 +37,7 @@ import android.view.ViewGroup;
|
||||
* Other changes should be done to ChooseLockPassword class instead and let this class inherit
|
||||
* those changes.
|
||||
*/
|
||||
public class SetupChooseLockPassword extends ChooseLockPassword
|
||||
implements SetupWizardNavBar.NavigationBarListener {
|
||||
public class SetupChooseLockPassword extends ChooseLockPassword {
|
||||
|
||||
public static Intent createIntent(Context context, int quality,
|
||||
int minLength, final int maxLength, boolean requirePasswordToDecrypt,
|
||||
@@ -66,9 +67,6 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
||||
return intent;
|
||||
}
|
||||
|
||||
private SetupWizardNavBar mNavigationBar;
|
||||
private SetupChooseLockPasswordFragment mFragment;
|
||||
|
||||
@Override
|
||||
protected boolean isValidFragment(String fragmentName) {
|
||||
return SetupChooseLockPasswordFragment.class.getName().equals(fragmentName);
|
||||
@@ -85,51 +83,22 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
||||
mNavigationBar = bar;
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
}
|
||||
public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment
|
||||
implements NavigationBar.NavigationBarListener {
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
if (mFragment != null) {
|
||||
mFragment.handleNext();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachFragment(Fragment fragment) {
|
||||
super.onAttachFragment(fragment);
|
||||
if (fragment instanceof SetupChooseLockPasswordFragment) {
|
||||
mFragment = (SetupChooseLockPasswordFragment) fragment;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment {
|
||||
private NavigationBar mNavigationBar;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
final View view = inflater.inflate(R.layout.setup_template, container, false);
|
||||
View scrollView = view.findViewById(R.id.bottom_scroll_view);
|
||||
SystemBarHelper.setImeInsetView(scrollView);
|
||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
||||
inflater.inflate(R.layout.setup_choose_lock_password, setupContent, true);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
SetupWizardUtils.setIllustration(getActivity(),
|
||||
R.drawable.setup_illustration_lock_screen);
|
||||
SetupWizardUtils.setHeaderText(getActivity(), getActivity().getTitle());
|
||||
final SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(
|
||||
R.layout.setup_choose_lock_password, container, false);
|
||||
SystemBarHelper.setImeInsetView(layout.findViewById(R.id.suw_bottom_scroll_view));
|
||||
mNavigationBar = layout.getNavigationBar();
|
||||
mNavigationBar.setNavigationBarListener(this);
|
||||
layout.setHeaderText(getActivity().getTitle());
|
||||
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,14 +110,25 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
||||
|
||||
@Override
|
||||
protected void setNextEnabled(boolean enabled) {
|
||||
SetupChooseLockPassword activity = (SetupChooseLockPassword) getActivity();
|
||||
activity.mNavigationBar.getNextButton().setEnabled(enabled);
|
||||
mNavigationBar.getNextButton().setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setNextText(int text) {
|
||||
SetupChooseLockPassword activity = (SetupChooseLockPassword) getActivity();
|
||||
activity.mNavigationBar.getNextButton().setText(text);
|
||||
mNavigationBar.getNextButton().setText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
final Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
handleNext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,8 +16,10 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizardlib.SetupWizardLayout;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -35,8 +37,7 @@ import android.widget.Button;
|
||||
* Other changes should be done to ChooseLockPattern class instead and let this class inherit
|
||||
* those changes.
|
||||
*/
|
||||
public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
implements SetupWizardNavBar.NavigationBarListener {
|
||||
public class SetupChooseLockPattern extends ChooseLockPattern {
|
||||
|
||||
public static Intent createIntent(Context context, boolean requirePassword,
|
||||
boolean confirmCredentials) {
|
||||
@@ -58,9 +59,6 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
return intent;
|
||||
}
|
||||
|
||||
private SetupWizardNavBar mNavigationBar;
|
||||
private SetupChooseLockPatternFragment mFragment;
|
||||
|
||||
@Override
|
||||
protected boolean isValidFragment(String fragmentName) {
|
||||
return SetupChooseLockPatternFragment.class.getName().equals(fragmentName);
|
||||
@@ -77,43 +75,21 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
||||
mNavigationBar = bar;
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
if (mFragment != null) {
|
||||
mFragment.handleRightButton();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachFragment(Fragment fragment) {
|
||||
super.onAttachFragment(fragment);
|
||||
if (fragment instanceof ChooseLockPatternFragment) {
|
||||
mFragment = (SetupChooseLockPatternFragment) fragment;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment {
|
||||
public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment
|
||||
implements NavigationBar.NavigationBarListener {
|
||||
|
||||
private NavigationBar mNavigationBar;
|
||||
private Button mRetryButton;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
final View view = inflater.inflate(R.layout.setup_template, container, false);
|
||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
||||
inflater.inflate(R.layout.setup_choose_lock_pattern, setupContent, true);
|
||||
return view;
|
||||
final SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(
|
||||
R.layout.setup_choose_lock_pattern, container, false);
|
||||
mNavigationBar = layout.getNavigationBar();
|
||||
mNavigationBar.setNavigationBarListener(this);
|
||||
layout.setHeaderText(getActivity().getTitle());
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,9 +97,7 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
mRetryButton = (Button) view.findViewById(R.id.retryButton);
|
||||
mRetryButton.setOnClickListener(this);
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
SetupWizardUtils.setIllustration(getActivity(),
|
||||
R.drawable.setup_illustration_lock_screen);
|
||||
SetupWizardUtils.setHeaderText(getActivity(), getActivity().getTitle());
|
||||
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -144,14 +118,12 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
|
||||
@Override
|
||||
protected void setRightButtonEnabled(boolean enabled) {
|
||||
SetupChooseLockPattern activity = (SetupChooseLockPattern) getActivity();
|
||||
activity.mNavigationBar.getNextButton().setEnabled(enabled);
|
||||
mNavigationBar.getNextButton().setEnabled(enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setRightButtonText(int text) {
|
||||
SetupChooseLockPattern activity = (SetupChooseLockPattern) getActivity();
|
||||
activity.mNavigationBar.getNextButton().setText(text);
|
||||
mNavigationBar.getNextButton().setText(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,5 +132,18 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
||||
// Only enable the button for retry
|
||||
mRetryButton.setEnabled(stage == Stage.FirstChoiceValid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
final Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
handleRightButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,8 +16,10 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizardlib.SetupWizardLayout;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -34,8 +36,7 @@ import android.view.ViewGroup;
|
||||
* Setup Wizard. Other changes should be done to EncryptionInterstitial class instead and let this
|
||||
* class inherit those changes.
|
||||
*/
|
||||
public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
||||
implements SetupWizardNavBar.NavigationBarListener{
|
||||
public class SetupEncryptionInterstitial extends EncryptionInterstitial {
|
||||
|
||||
public static Intent createStartIntent(Context ctx, int quality,
|
||||
boolean requirePasswordDefault) {
|
||||
@@ -66,32 +67,29 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
setResult(RESULT_OK, getResultIntentData());
|
||||
finish();
|
||||
}
|
||||
|
||||
public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
|
||||
public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment
|
||||
implements NavigationBar.NavigationBarListener {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.setup_template, container, false);
|
||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
||||
View content = super.onCreateView(inflater, setupContent, savedInstanceState);
|
||||
setupContent.addView(content);
|
||||
return view;
|
||||
final SetupWizardLayout layout = new SetupWizardLayout(inflater.getContext());
|
||||
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
||||
R.drawable.setup_illustration_horizontal_tile);
|
||||
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
||||
final int headerTextResource = getHeaderTextResource();
|
||||
layout.setHeaderText(headerTextResource);
|
||||
|
||||
View content = super.onCreateView(inflater, layout, savedInstanceState);
|
||||
layout.addView(content);
|
||||
layout.getNavigationBar().setNavigationBarListener(this);
|
||||
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.setTitle(headerTextResource);
|
||||
SetupWizardUtils.setImmersiveMode(activity);
|
||||
}
|
||||
return layout;
|
||||
}
|
||||
|
||||
private int getHeaderTextResource() {
|
||||
@@ -108,13 +106,21 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
SetupWizardUtils.setIllustration(getActivity(),
|
||||
R.drawable.setup_illustration_lock_screen);
|
||||
final int title = getHeaderTextResource();
|
||||
getActivity().setTitle(title);
|
||||
SetupWizardUtils.setHeaderText(getActivity(), title);
|
||||
public void onNavigateBack() {
|
||||
final Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
final SetupEncryptionInterstitial activity =
|
||||
(SetupEncryptionInterstitial) getActivity();
|
||||
if (activity != null) {
|
||||
activity.setResult(RESULT_OK, activity.getResultIntentData());
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,8 +17,10 @@
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.settings.notification.RedactionInterstitial;
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizardlib.SetupWizardLayout;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
@@ -34,8 +36,7 @@ import android.view.ViewGroup;
|
||||
* Wizard. Other changes should be done to RedactionInterstitial class instead and let this class
|
||||
* inherit those changes.
|
||||
*/
|
||||
public class SetupRedactionInterstitial extends RedactionInterstitial
|
||||
implements SetupWizardNavBar.NavigationBarListener{
|
||||
public class SetupRedactionInterstitial extends RedactionInterstitial {
|
||||
|
||||
public static Intent createStartIntent(Context ctx) {
|
||||
Intent startIntent = RedactionInterstitial.createStartIntent(ctx);
|
||||
@@ -64,41 +65,43 @@ public class SetupRedactionInterstitial extends RedactionInterstitial
|
||||
super.onApplyThemeResource(theme, resid, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
bar.getBackButton().setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateBack() {
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
setResult(RESULT_OK, getResultIntentData());
|
||||
finish();
|
||||
}
|
||||
|
||||
public static class SetupEncryptionInterstitialFragment extends RedactionInterstitialFragment {
|
||||
public static class SetupEncryptionInterstitialFragment extends RedactionInterstitialFragment
|
||||
implements NavigationBar.NavigationBarListener {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.setup_template, container, false);
|
||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
||||
View content = super.onCreateView(inflater, setupContent, savedInstanceState);
|
||||
setupContent.addView(content);
|
||||
return view;
|
||||
final SetupWizardLayout layout = new SetupWizardLayout(inflater.getContext());
|
||||
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
||||
R.drawable.setup_illustration_horizontal_tile);
|
||||
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
||||
layout.setHeaderText(R.string.notification_section_header);
|
||||
|
||||
View content = super.onCreateView(inflater, layout, savedInstanceState);
|
||||
layout.addView(content);
|
||||
|
||||
final NavigationBar navigationBar = layout.getNavigationBar();
|
||||
navigationBar.setNavigationBarListener(this);
|
||||
navigationBar.getBackButton().setEnabled(false);
|
||||
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
SetupWizardUtils.setIllustration(getActivity(),
|
||||
R.drawable.setup_illustration_lock_screen);
|
||||
SetupWizardUtils.setHeaderText(getActivity(), R.string.notification_section_header);
|
||||
public void onNavigateBack() {
|
||||
final Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigateNext() {
|
||||
final SetupRedactionInterstitial activity = (SetupRedactionInterstitial) getActivity();
|
||||
if (activity != null) {
|
||||
activity.setResult(RESULT_OK, activity.getResultIntentData());
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -16,17 +16,12 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import com.android.settings.widget.SetupWizardIllustration;
|
||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.LayerDrawable;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class SetupWizardUtils {
|
||||
private static final String TAG = "SetupWizardUtils";
|
||||
@@ -62,42 +57,10 @@ public class SetupWizardUtils {
|
||||
SystemBarHelper.hideSystemBars(dialog);
|
||||
}
|
||||
|
||||
public static TextView getHeader(Activity activity) {
|
||||
return (TextView) activity.findViewById(R.id.title);
|
||||
}
|
||||
|
||||
public static void setHeaderText(Activity activity, int text) {
|
||||
getHeader(activity).setText(text);
|
||||
}
|
||||
|
||||
public static void setHeaderText(Activity activity, CharSequence text) {
|
||||
getHeader(activity).setText(text);
|
||||
}
|
||||
|
||||
public static void copySetupExtras(Intent fromIntent, Intent toIntent) {
|
||||
toIntent.putExtra(WizardManagerHelper.EXTRA_THEME,
|
||||
fromIntent.getStringExtra(WizardManagerHelper.EXTRA_THEME));
|
||||
toIntent.putExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE,
|
||||
fromIntent.getBooleanExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE, false));
|
||||
}
|
||||
|
||||
public static void setIllustration(Activity activity, int asset) {
|
||||
SetupWizardIllustration illustration =
|
||||
(SetupWizardIllustration) activity.findViewById(R.id.setup_illustration);
|
||||
if (illustration != null) {
|
||||
Drawable drawable = activity.getDrawable(R.drawable.setup_illustration);
|
||||
Drawable newIllustration = activity.getDrawable(asset);
|
||||
if (drawable instanceof LayerDrawable) {
|
||||
LayerDrawable layers = (LayerDrawable) drawable;
|
||||
Drawable oldIllustration = layers.findDrawableByLayerId(R.id.illustration_image);
|
||||
if (newIllustration instanceof BitmapDrawable
|
||||
&& oldIllustration instanceof BitmapDrawable) {
|
||||
final int gravity = ((BitmapDrawable) oldIllustration).getGravity();
|
||||
((BitmapDrawable) newIllustration).setGravity(gravity);
|
||||
}
|
||||
layers.setDrawableByLayerId(R.id.illustration_image, newIllustration);
|
||||
illustration.setForeground(layers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,8 @@ import android.widget.TextView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.setupwizardlib.SetupWizardListLayout;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
/**
|
||||
* This customized version of WifiSettings is shown to the user only during Setup Wizard. Menu
|
||||
@@ -48,15 +50,9 @@ public class WifiSettingsForSetupWizard extends WifiSettings {
|
||||
@Override
|
||||
public View onCreateView(final LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
||||
final View view = inflater.inflate(R.layout.setup_preference, container, false);
|
||||
|
||||
final ListView list = (ListView) view.findViewById(android.R.id.list);
|
||||
final View title = view.findViewById(R.id.title);
|
||||
if (title == null) {
|
||||
final View header = inflater.inflate(R.layout.setup_wizard_header, list, false);
|
||||
list.addHeaderView(header, null, false);
|
||||
}
|
||||
final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
|
||||
R.layout.setup_wifi_layout, container, false);
|
||||
final ListView list = layout.getListView();
|
||||
|
||||
mAddOtherNetworkItem = inflater.inflate(R.layout.setup_wifi_add_network, list, false);
|
||||
list.addFooterView(mAddOtherNetworkItem, null, true);
|
||||
@@ -69,19 +65,19 @@ public class WifiSettingsForSetupWizard extends WifiSettings {
|
||||
}
|
||||
});
|
||||
|
||||
return view;
|
||||
final NavigationBar navigationBar = layout.getNavigationBar();
|
||||
if (navigationBar != null) {
|
||||
WifiSetupActivity activity = (WifiSetupActivity) getActivity();
|
||||
activity.onNavigationBarCreated(navigationBar);
|
||||
}
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
getView().setSystemUiVisibility(
|
||||
View.STATUS_BAR_DISABLE_HOME |
|
||||
View.STATUS_BAR_DISABLE_RECENT |
|
||||
View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS |
|
||||
View.STATUS_BAR_DISABLE_CLOCK);
|
||||
|
||||
if (hasNextButton()) {
|
||||
getNextButton().setVisibility(View.GONE);
|
||||
}
|
||||
|
@@ -35,11 +35,10 @@ import android.util.Log;
|
||||
import com.android.settings.ButtonBarHandler;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
|
||||
import com.android.setupwizardlib.view.NavigationBar;
|
||||
|
||||
public class WifiSetupActivity extends WifiPickerActivity
|
||||
implements ButtonBarHandler, NavigationBarListener {
|
||||
implements ButtonBarHandler, NavigationBar.NavigationBarListener {
|
||||
private static final String TAG = "WifiSetupActivity";
|
||||
|
||||
// this boolean extra specifies whether to auto finish when connection is established
|
||||
@@ -72,7 +71,7 @@ public class WifiSetupActivity extends WifiPickerActivity
|
||||
// Whether the device is connected to WiFi
|
||||
private boolean mWifiConnected;
|
||||
|
||||
private SetupWizardNavBar mNavigationBar;
|
||||
private NavigationBar mNavigationBar;
|
||||
|
||||
private IntentFilter mFilter = new IntentFilter();
|
||||
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||
@@ -203,9 +202,9 @@ public class WifiSetupActivity extends WifiPickerActivity
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNavigationBarCreated(final SetupWizardNavBar bar) {
|
||||
public void onNavigationBarCreated(final NavigationBar bar) {
|
||||
mNavigationBar = bar;
|
||||
bar.setNavigationBarListener(this);
|
||||
SetupWizardUtils.setImmersiveMode(this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user