[Setup] Use SetupWizardLayout
Use SetupWizardLayout for the screens that show in Settings to get better visual consistency and new features like showing a progress bar in list view. Bug: 19594252 Change-Id: I53ab17a4c2d922a362e3762f1cdccb512f7d8f6e
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,7 +15,17 @@
|
|||||||
limitations under the License.
|
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"
|
||||||
|
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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
@@ -81,4 +91,6 @@
|
|||||||
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.android.setupwizardlib.SetupWizardLayout>
|
||||||
|
@@ -15,8 +15,17 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
<com.android.setupwizardlib.SetupWizardLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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">
|
||||||
|
|
||||||
|
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
|
||||||
android:id="@+id/topLayout"
|
android:id="@+id/topLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -35,7 +44,7 @@
|
|||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:minHeight="50dp"
|
android:minHeight="50dip"
|
||||||
android:textSize="18sp"/>
|
android:textSize="18sp"/>
|
||||||
|
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
@@ -60,7 +69,7 @@
|
|||||||
<TextView android:id="@+id/footerText"
|
<TextView android:id="@+id/footerText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="50dp"
|
android:minHeight="50dip"
|
||||||
android:textSize="14sp"/>
|
android:textSize="14sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -91,4 +100,6 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
</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:layout_height="wrap_content"
|
||||||
android:paddingTop="6dip"
|
android:paddingTop="6dip"
|
||||||
android:paddingBottom="6dip"
|
android:paddingBottom="6dip"
|
||||||
android:paddingStart="@dimen/setup_wizard_margin_sides"
|
android:paddingStart="@dimen/suw_layout_margin_sides"
|
||||||
android:paddingEnd="@dimen/setup_wizard_margin_sides"
|
android:paddingEnd="@dimen/suw_layout_margin_sides"
|
||||||
android:text="@string/unlock_setup_wizard_fingerprint_details" />
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/setup_wizard_margin_top"
|
android:paddingTop="@dimen/setup_wizard_margin_top"
|
||||||
android:paddingStart="@dimen/setup_wizard_margin_sides"
|
android:paddingStart="@dimen/suw_layout_margin_sides"
|
||||||
android:paddingEnd="@dimen/setup_wizard_margin_sides"
|
android:paddingEnd="@dimen/suw_layout_margin_sides"
|
||||||
android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
|
android:textAppearance="@style/TextAppearance.SetupWizardDescription" />
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -15,19 +15,12 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.android.setupwizardlib.SetupWizardListLayout
|
||||||
android:autoMirrored="true">
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
<item>
|
android:layout_width="match_parent"
|
||||||
<bitmap android:src="@drawable/setup_illustration_horizontal_tile"
|
android:layout_height="match_parent"
|
||||||
android:gravity="top"
|
settings:suwBackgroundTile="@drawable/setup_illustration_tile"
|
||||||
android:tileModeX="repeat"
|
settings:suwHeaderText="@string/wifi_setup_wizard_title"
|
||||||
android:tileModeY="disabled" />
|
settings:suwIllustrationHorizontalTile="@drawable/setup_illustration_horizontal_tile"
|
||||||
</item>
|
settings:suwIllustrationImage="@drawable/setup_illustration_wifi" />
|
||||||
|
|
||||||
<item android:id="@+id/illustration_image">
|
|
||||||
<bitmap android:src="@drawable/setup_illustration_wifi"
|
|
||||||
android:gravity="top|start" />
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</layer-list>
|
|
@@ -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 -->
|
<!-- Dashboard tile image margin start / end -->
|
||||||
<dimen name="dashboard_tile_image_margin_start">12dp</dimen>
|
<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>
|
</resources>
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
<dimen name="content_margin_left">16dip</dimen>
|
<dimen name="content_margin_left">16dip</dimen>
|
||||||
<dimen name="description_margin_top">26dip</dimen>
|
<dimen name="description_margin_top">26dip</dimen>
|
||||||
<dimen name="crypt_clock_size">120sp</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_width">325dip</dimen>
|
||||||
<dimen name="appwidget_min_height">50dip</dimen>
|
<dimen name="appwidget_min_height">50dip</dimen>
|
||||||
|
|
||||||
|
@@ -38,28 +38,10 @@
|
|||||||
|
|
||||||
<dimen name="crypt_clock_size">100sp</dimen>
|
<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 -->
|
<!-- 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_list_no_icon_padding">56dp</dimen>
|
||||||
<dimen name="setup_add_network_item_height">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_margin_top">24dp</dimen>
|
||||||
<dimen name="setup_wizard_title_area_elevation">3dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="divider_height">3dip</dimen>
|
<dimen name="divider_height">3dip</dimen>
|
||||||
<dimen name="divider_margin_top">6dip</dimen>
|
<dimen name="divider_margin_top">6dip</dimen>
|
||||||
|
@@ -146,45 +146,6 @@
|
|||||||
<item name="android:clickable">false</item>
|
<item name="android:clickable">false</item>
|
||||||
</style>
|
</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 name="TextAppearance.SetupWizardDescription" parent="@android:style/TextAppearance.Material.Subhead">
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
<style name="SetupWizardTheme" parent="SuwThemeMaterial">
|
<style name="SetupWizardTheme" parent="SuwThemeMaterial">
|
||||||
<item name="android:alertDialogTheme">@style/Theme.WifiDialog</item>
|
<item name="android:alertDialogTheme">@style/Theme.WifiDialog</item>
|
||||||
<item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
|
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
|
||||||
<item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
|
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
|
||||||
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
||||||
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
||||||
<item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
|
<item name="ic_menu_add">@drawable/ic_menu_add_dark</item>
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
|
|
||||||
<style name="SetupWizardTheme.Light" parent="SuwThemeMaterial.Light">
|
<style name="SetupWizardTheme.Light" parent="SuwThemeMaterial.Light">
|
||||||
<item name="android:alertDialogTheme">@style/Theme.Light.WifiDialog</item>
|
<item name="android:alertDialogTheme">@style/Theme.Light.WifiDialog</item>
|
||||||
<item name="android:listPreferredItemPaddingEnd">@dimen/setup_wizard_margin_sides</item>
|
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
|
||||||
<item name="android:listPreferredItemPaddingStart">@dimen/setup_wizard_margin_sides</item>
|
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
|
||||||
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
<item name="android:windowBackground">?android:attr/colorBackground</item>
|
||||||
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
<item name="@*android:preferencePanelStyle">@*android:style/PreferencePanel.Dialog</item>
|
||||||
<item name="ic_menu_add">@drawable/ic_menu_add_light</item>
|
<item name="ic_menu_add">@drawable/ic_menu_add_light</item>
|
||||||
|
@@ -16,8 +16,10 @@
|
|||||||
|
|
||||||
package com.android.settings;
|
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.app.admin.DevicePolicyManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
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
|
* Other changes should be done to ChooseLockGeneric class instead and let this class inherit
|
||||||
* those changes.
|
* those changes.
|
||||||
*/
|
*/
|
||||||
public class SetupChooseLockGeneric extends ChooseLockGeneric
|
public class SetupChooseLockGeneric extends ChooseLockGeneric {
|
||||||
implements SetupWizardNavBar.NavigationBarListener {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isValidFragment(String fragmentName) {
|
protected boolean isValidFragment(String fragmentName) {
|
||||||
@@ -56,33 +57,16 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
|||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
implements NavigationBar.NavigationBarListener {
|
||||||
SetupWizardUtils.setImmersiveMode(this);
|
|
||||||
bar.getNextButton().setEnabled(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNavigateBack() {
|
|
||||||
onBackPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNavigateNext() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class SetupChooseLockGenericFragment extends ChooseLockGenericFragment {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
final View view = inflater.inflate(R.layout.setup_preference, container, false);
|
final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
|
||||||
ListView list = (ListView) view.findViewById(android.R.id.list);
|
R.layout.setup_choose_lock_generic, container, false);
|
||||||
View title = view.findViewById(R.id.title);
|
layout.setHeaderText(getActivity().getTitle());
|
||||||
if (title == null) {
|
ListView list = layout.getListView();
|
||||||
final View header = inflater.inflate(R.layout.setup_wizard_header, list, false);
|
|
||||||
list.addHeaderView(header, null, false);
|
|
||||||
}
|
|
||||||
final FingerprintManager fpm = (FingerprintManager)
|
final FingerprintManager fpm = (FingerprintManager)
|
||||||
getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
|
getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
|
||||||
if (fpm != null && fpm.isHardwareDetected()) {
|
if (fpm != null && fpm.isHardwareDetected()) {
|
||||||
@@ -90,15 +74,18 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
|||||||
R.layout.setup_screen_lock_fingerprint_details, list, false);
|
R.layout.setup_screen_lock_fingerprint_details, list, false);
|
||||||
list.addFooterView(footer, null, false);
|
list.addFooterView(footer, null, false);
|
||||||
}
|
}
|
||||||
return view;
|
|
||||||
|
final NavigationBar navigationBar = layout.getNavigationBar();
|
||||||
|
navigationBar.getNextButton().setEnabled(false);
|
||||||
|
navigationBar.setNavigationBarListener(this);
|
||||||
|
|
||||||
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
SetupWizardUtils.setIllustration(getActivity(),
|
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||||
R.drawable.setup_illustration_lock_screen);
|
|
||||||
SetupWizardUtils.setHeaderText(getActivity(), getActivity().getTitle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -192,5 +179,17 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric
|
|||||||
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
|
SetupWizardUtils.copySetupExtras(getActivity().getIntent(), intent);
|
||||||
return 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;
|
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.util.SystemBarHelper;
|
||||||
|
import com.android.setupwizardlib.view.NavigationBar;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
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
|
* Other changes should be done to ChooseLockPassword class instead and let this class inherit
|
||||||
* those changes.
|
* those changes.
|
||||||
*/
|
*/
|
||||||
public class SetupChooseLockPassword extends ChooseLockPassword
|
public class SetupChooseLockPassword extends ChooseLockPassword {
|
||||||
implements SetupWizardNavBar.NavigationBarListener {
|
|
||||||
|
|
||||||
public static Intent createIntent(Context context, int quality,
|
public static Intent createIntent(Context context, int quality,
|
||||||
int minLength, final int maxLength, boolean requirePasswordToDecrypt,
|
int minLength, final int maxLength, boolean requirePasswordToDecrypt,
|
||||||
@@ -66,9 +67,6 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
|||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SetupWizardNavBar mNavigationBar;
|
|
||||||
private SetupChooseLockPasswordFragment mFragment;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isValidFragment(String fragmentName) {
|
protected boolean isValidFragment(String fragmentName) {
|
||||||
return SetupChooseLockPasswordFragment.class.getName().equals(fragmentName);
|
return SetupChooseLockPasswordFragment.class.getName().equals(fragmentName);
|
||||||
@@ -85,51 +83,22 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
|||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class SetupChooseLockPasswordFragment extends ChooseLockPasswordFragment
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
implements NavigationBar.NavigationBarListener {
|
||||||
mNavigationBar = bar;
|
|
||||||
SetupWizardUtils.setImmersiveMode(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
private NavigationBar mNavigationBar;
|
||||||
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 {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
final View view = inflater.inflate(R.layout.setup_template, container, false);
|
final SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(
|
||||||
View scrollView = view.findViewById(R.id.bottom_scroll_view);
|
R.layout.setup_choose_lock_password, container, false);
|
||||||
SystemBarHelper.setImeInsetView(scrollView);
|
SystemBarHelper.setImeInsetView(layout.findViewById(R.id.suw_bottom_scroll_view));
|
||||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
mNavigationBar = layout.getNavigationBar();
|
||||||
inflater.inflate(R.layout.setup_choose_lock_password, setupContent, true);
|
mNavigationBar.setNavigationBarListener(this);
|
||||||
return view;
|
layout.setHeaderText(getActivity().getTitle());
|
||||||
}
|
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(), getActivity().getTitle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -141,14 +110,25 @@ public class SetupChooseLockPassword extends ChooseLockPassword
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setNextEnabled(boolean enabled) {
|
protected void setNextEnabled(boolean enabled) {
|
||||||
SetupChooseLockPassword activity = (SetupChooseLockPassword) getActivity();
|
mNavigationBar.getNextButton().setEnabled(enabled);
|
||||||
activity.mNavigationBar.getNextButton().setEnabled(enabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setNextText(int text) {
|
protected void setNextText(int text) {
|
||||||
SetupChooseLockPassword activity = (SetupChooseLockPassword) getActivity();
|
mNavigationBar.getNextButton().setText(text);
|
||||||
activity.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;
|
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.app.Fragment;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
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
|
* Other changes should be done to ChooseLockPattern class instead and let this class inherit
|
||||||
* those changes.
|
* those changes.
|
||||||
*/
|
*/
|
||||||
public class SetupChooseLockPattern extends ChooseLockPattern
|
public class SetupChooseLockPattern extends ChooseLockPattern {
|
||||||
implements SetupWizardNavBar.NavigationBarListener {
|
|
||||||
|
|
||||||
public static Intent createIntent(Context context, boolean requirePassword,
|
public static Intent createIntent(Context context, boolean requirePassword,
|
||||||
boolean confirmCredentials) {
|
boolean confirmCredentials) {
|
||||||
@@ -58,9 +59,6 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
|||||||
return intent;
|
return intent;
|
||||||
}
|
}
|
||||||
|
|
||||||
private SetupWizardNavBar mNavigationBar;
|
|
||||||
private SetupChooseLockPatternFragment mFragment;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isValidFragment(String fragmentName) {
|
protected boolean isValidFragment(String fragmentName) {
|
||||||
return SetupChooseLockPatternFragment.class.getName().equals(fragmentName);
|
return SetupChooseLockPatternFragment.class.getName().equals(fragmentName);
|
||||||
@@ -77,43 +75,21 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
|||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class SetupChooseLockPatternFragment extends ChooseLockPatternFragment
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
implements NavigationBar.NavigationBarListener {
|
||||||
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 {
|
|
||||||
|
|
||||||
|
private NavigationBar mNavigationBar;
|
||||||
private Button mRetryButton;
|
private Button mRetryButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
final View view = inflater.inflate(R.layout.setup_template, container, false);
|
final SetupWizardLayout layout = (SetupWizardLayout) inflater.inflate(
|
||||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
R.layout.setup_choose_lock_pattern, container, false);
|
||||||
inflater.inflate(R.layout.setup_choose_lock_pattern, setupContent, true);
|
mNavigationBar = layout.getNavigationBar();
|
||||||
return view;
|
mNavigationBar.setNavigationBarListener(this);
|
||||||
|
layout.setHeaderText(getActivity().getTitle());
|
||||||
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -121,9 +97,7 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
|||||||
mRetryButton = (Button) view.findViewById(R.id.retryButton);
|
mRetryButton = (Button) view.findViewById(R.id.retryButton);
|
||||||
mRetryButton.setOnClickListener(this);
|
mRetryButton.setOnClickListener(this);
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
SetupWizardUtils.setIllustration(getActivity(),
|
SetupWizardUtils.setImmersiveMode(getActivity());
|
||||||
R.drawable.setup_illustration_lock_screen);
|
|
||||||
SetupWizardUtils.setHeaderText(getActivity(), getActivity().getTitle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -144,14 +118,12 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setRightButtonEnabled(boolean enabled) {
|
protected void setRightButtonEnabled(boolean enabled) {
|
||||||
SetupChooseLockPattern activity = (SetupChooseLockPattern) getActivity();
|
mNavigationBar.getNextButton().setEnabled(enabled);
|
||||||
activity.mNavigationBar.getNextButton().setEnabled(enabled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setRightButtonText(int text) {
|
protected void setRightButtonText(int text) {
|
||||||
SetupChooseLockPattern activity = (SetupChooseLockPattern) getActivity();
|
mNavigationBar.getNextButton().setText(text);
|
||||||
activity.mNavigationBar.getNextButton().setText(text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -160,5 +132,18 @@ public class SetupChooseLockPattern extends ChooseLockPattern
|
|||||||
// Only enable the button for retry
|
// Only enable the button for retry
|
||||||
mRetryButton.setEnabled(stage == Stage.FirstChoiceValid);
|
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;
|
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.app.admin.DevicePolicyManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
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
|
* Setup Wizard. Other changes should be done to EncryptionInterstitial class instead and let this
|
||||||
* class inherit those changes.
|
* class inherit those changes.
|
||||||
*/
|
*/
|
||||||
public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
public class SetupEncryptionInterstitial extends EncryptionInterstitial {
|
||||||
implements SetupWizardNavBar.NavigationBarListener{
|
|
||||||
|
|
||||||
public static Intent createStartIntent(Context ctx, int quality,
|
public static Intent createStartIntent(Context ctx, int quality,
|
||||||
boolean requirePasswordDefault) {
|
boolean requirePasswordDefault) {
|
||||||
@@ -66,32 +67,29 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
|||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
implements NavigationBar.NavigationBarListener {
|
||||||
SetupWizardUtils.setImmersiveMode(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNavigateBack() {
|
|
||||||
onBackPressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNavigateNext() {
|
|
||||||
setResult(RESULT_OK, getResultIntentData());
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class SetupEncryptionInterstitialFragment extends EncryptionInterstitialFragment {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.setup_template, container, false);
|
final SetupWizardLayout layout = new SetupWizardLayout(inflater.getContext());
|
||||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
||||||
View content = super.onCreateView(inflater, setupContent, savedInstanceState);
|
R.drawable.setup_illustration_horizontal_tile);
|
||||||
setupContent.addView(content);
|
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
||||||
return view;
|
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() {
|
private int getHeaderTextResource() {
|
||||||
@@ -108,13 +106,21 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onNavigateBack() {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
final Activity activity = getActivity();
|
||||||
SetupWizardUtils.setIllustration(getActivity(),
|
if (activity != null) {
|
||||||
R.drawable.setup_illustration_lock_screen);
|
activity.onBackPressed();
|
||||||
final int title = getHeaderTextResource();
|
}
|
||||||
getActivity().setTitle(title);
|
}
|
||||||
SetupWizardUtils.setHeaderText(getActivity(), title);
|
|
||||||
|
@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;
|
package com.android.settings;
|
||||||
|
|
||||||
import com.android.settings.notification.RedactionInterstitial;
|
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.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Resources;
|
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
|
* Wizard. Other changes should be done to RedactionInterstitial class instead and let this class
|
||||||
* inherit those changes.
|
* inherit those changes.
|
||||||
*/
|
*/
|
||||||
public class SetupRedactionInterstitial extends RedactionInterstitial
|
public class SetupRedactionInterstitial extends RedactionInterstitial {
|
||||||
implements SetupWizardNavBar.NavigationBarListener{
|
|
||||||
|
|
||||||
public static Intent createStartIntent(Context ctx) {
|
public static Intent createStartIntent(Context ctx) {
|
||||||
Intent startIntent = RedactionInterstitial.createStartIntent(ctx);
|
Intent startIntent = RedactionInterstitial.createStartIntent(ctx);
|
||||||
@@ -64,41 +65,43 @@ public class SetupRedactionInterstitial extends RedactionInterstitial
|
|||||||
super.onApplyThemeResource(theme, resid, first);
|
super.onApplyThemeResource(theme, resid, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static class SetupEncryptionInterstitialFragment extends RedactionInterstitialFragment
|
||||||
public void onNavigationBarCreated(SetupWizardNavBar bar) {
|
implements NavigationBar.NavigationBarListener {
|
||||||
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 {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.setup_template, container, false);
|
final SetupWizardLayout layout = new SetupWizardLayout(inflater.getContext());
|
||||||
ViewGroup setupContent = (ViewGroup) view.findViewById(R.id.setup_content);
|
layout.setIllustration(R.drawable.setup_illustration_lock_screen,
|
||||||
View content = super.onCreateView(inflater, setupContent, savedInstanceState);
|
R.drawable.setup_illustration_horizontal_tile);
|
||||||
setupContent.addView(content);
|
layout.setBackgroundTile(R.drawable.setup_illustration_tile);
|
||||||
return view;
|
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
|
@Override
|
||||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
public void onNavigateBack() {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
final Activity activity = getActivity();
|
||||||
SetupWizardUtils.setIllustration(getActivity(),
|
if (activity != null) {
|
||||||
R.drawable.setup_illustration_lock_screen);
|
activity.onBackPressed();
|
||||||
SetupWizardUtils.setHeaderText(getActivity(), R.string.notification_section_header);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@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;
|
package com.android.settings;
|
||||||
|
|
||||||
import com.android.settings.widget.SetupWizardIllustration;
|
|
||||||
import com.android.setupwizardlib.util.SystemBarHelper;
|
import com.android.setupwizardlib.util.SystemBarHelper;
|
||||||
import com.android.setupwizardlib.util.WizardManagerHelper;
|
import com.android.setupwizardlib.util.WizardManagerHelper;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
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 {
|
public class SetupWizardUtils {
|
||||||
private static final String TAG = "SetupWizardUtils";
|
private static final String TAG = "SetupWizardUtils";
|
||||||
@@ -75,42 +70,10 @@ public class SetupWizardUtils {
|
|||||||
SystemBarHelper.hideSystemBars(dialog);
|
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) {
|
public static void copySetupExtras(Intent fromIntent, Intent toIntent) {
|
||||||
toIntent.putExtra(WizardManagerHelper.EXTRA_THEME,
|
toIntent.putExtra(WizardManagerHelper.EXTRA_THEME,
|
||||||
fromIntent.getStringExtra(WizardManagerHelper.EXTRA_THEME));
|
fromIntent.getStringExtra(WizardManagerHelper.EXTRA_THEME));
|
||||||
toIntent.putExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE,
|
toIntent.putExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE,
|
||||||
fromIntent.getBooleanExtra(WizardManagerHelper.EXTRA_USE_IMMERSIVE_MODE, false));
|
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.R;
|
||||||
import com.android.settings.SetupWizardUtils;
|
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
|
* 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
|
@Override
|
||||||
public View onCreateView(final LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(final LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
|
||||||
final View view = inflater.inflate(R.layout.setup_preference, container, false);
|
R.layout.setup_wifi_layout, container, false);
|
||||||
|
final ListView list = layout.getListView();
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
mAddOtherNetworkItem = inflater.inflate(R.layout.setup_wifi_add_network, list, false);
|
mAddOtherNetworkItem = inflater.inflate(R.layout.setup_wifi_add_network, list, false);
|
||||||
list.addFooterView(mAddOtherNetworkItem, null, true);
|
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
|
@Override
|
||||||
public void onActivityCreated(Bundle savedInstanceState) {
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(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()) {
|
if (hasNextButton()) {
|
||||||
getNextButton().setVisibility(View.GONE);
|
getNextButton().setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@@ -35,11 +35,10 @@ import android.util.Log;
|
|||||||
import com.android.settings.ButtonBarHandler;
|
import com.android.settings.ButtonBarHandler;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.SetupWizardUtils;
|
import com.android.settings.SetupWizardUtils;
|
||||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
|
import com.android.setupwizardlib.view.NavigationBar;
|
||||||
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
|
|
||||||
|
|
||||||
public class WifiSetupActivity extends WifiPickerActivity
|
public class WifiSetupActivity extends WifiPickerActivity
|
||||||
implements ButtonBarHandler, NavigationBarListener {
|
implements ButtonBarHandler, NavigationBar.NavigationBarListener {
|
||||||
private static final String TAG = "WifiSetupActivity";
|
private static final String TAG = "WifiSetupActivity";
|
||||||
|
|
||||||
// this boolean extra specifies whether to auto finish when connection is established
|
// 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
|
// Whether the device is connected to WiFi
|
||||||
private boolean mWifiConnected;
|
private boolean mWifiConnected;
|
||||||
|
|
||||||
private SetupWizardNavBar mNavigationBar;
|
private NavigationBar mNavigationBar;
|
||||||
|
|
||||||
private IntentFilter mFilter = new IntentFilter();
|
private IntentFilter mFilter = new IntentFilter();
|
||||||
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
|
||||||
@@ -209,9 +208,9 @@ public class WifiSetupActivity extends WifiPickerActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void onNavigationBarCreated(final NavigationBar bar) {
|
||||||
public void onNavigationBarCreated(final SetupWizardNavBar bar) {
|
|
||||||
mNavigationBar = bar;
|
mNavigationBar = bar;
|
||||||
|
bar.setNavigationBarListener(this);
|
||||||
SetupWizardUtils.setImmersiveMode(this);
|
SetupWizardUtils.setImmersiveMode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user