diff options
author | cretin45 <cretin45@gmail.com> | 2015-01-21 15:55:03 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-01-21 15:55:03 -0800 |
commit | 716ffa86dc68d72a6eb031a7ed52759b2298d4f3 (patch) | |
tree | 43523316775c317373411bd878ba07a60ccf2a3d | |
parent | 48ca24eb9b92c9b62970c3a12e963f497fc65bbc (diff) | |
download | packages_apps_SetupWizard-716ffa86dc68d72a6eb031a7ed52759b2298d4f3.zip packages_apps_SetupWizard-716ffa86dc68d72a6eb031a7ed52759b2298d4f3.tar.gz packages_apps_SetupWizard-716ffa86dc68d72a6eb031a7ed52759b2298d4f3.tar.bz2 |
SetupWizard: More refactor to match redlines
Change-Id: I74f422ba0c294d5e91aefb9356458c681cc53b37
35 files changed, 874 insertions, 654 deletions
diff --git a/res/anim/slide_left.xml b/res/anim/slide_left.xml index fa15cc7..283638e 100644 --- a/res/anim/slide_left.xml +++ b/res/anim/slide_left.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> -<set> - <translate xmlns:android="http://schemas.android.com/apk/res/android" - android:fromXDelta="-100%" - android:toXDelta="0" - android:interpolator="@android:anim/decelerate_interpolator" - android:duration="500"/> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <objectAnimator android:duration="@android:integer/config_mediumAnimTime" + android:interpolator="@android:anim/accelerate_interpolator" + android:propertyName="x" + android:valueFrom="1280" + android:valueTo="0" + android:valueType="floatType"/> </set> diff --git a/res/anim/slide_right.xml b/res/anim/slide_right.xml index 849f0c8..49de7e9 100644 --- a/res/anim/slide_right.xml +++ b/res/anim/slide_right.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> -<set> - <translate xmlns:android="http://schemas.android.com/apk/res/android" - android:fromXDelta="0" - android:toXDelta="100%" - android:interpolator="@android:anim/decelerate_interpolator" - android:duration="500"/> +<set xmlns:android="http://schemas.android.com/apk/res/android"> + <objectAnimator android:duration="@android:integer/config_mediumAnimTime" + android:interpolator="@android:anim/accelerate_interpolator" + android:propertyName="x" + android:valueFrom="0" + android:valueTo="-1280" + android:valueType="floatType"/> </set> diff --git a/res/drawable/divider.xml b/res/drawable/divider.xml index fb38c5b..34f43ba 100644 --- a/res/drawable/divider.xml +++ b/res/drawable/divider.xml @@ -16,5 +16,5 @@ --> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="@color/divider" /> - <size android:width="316dp" android:height="1dp"/> + <size android:width="316dp" android:height="1px"/> </shape>
\ No newline at end of file diff --git a/res/drawable/reveal.xml b/res/drawable/reveal.xml new file mode 100644 index 0000000..abcbf19 --- /dev/null +++ b/res/drawable/reveal.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" > + <solid android:color="@color/page_background" /> +</shape>
\ No newline at end of file diff --git a/res/layout-land/logo_header.xml b/res/layout-land/logo_header.xml new file mode 100644 index 0000000..30929e7 --- /dev/null +++ b/res/layout-land/logo_header.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod 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. +--> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/header" + android:layout_width="0px" + android:layout_height="match_parent" + android:layout_weight="1" + android:paddingTop="@dimen/header_logo_margin_top" + style="@style/Header"> + + <ImageView + android:id="@+id/brand_logo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/brand" + android:paddingLeft="@dimen/header_logo_margin_left" + android:paddingBottom="@dimen/header_logo_margin_bottom" + android:layout_alignParentTop="true"/> + + <ImageView + android:id="@+id/powered_by_logo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/powered_by" + android:visibility="gone" + android:paddingLeft="@dimen/header_logo_margin_left" + android:paddingBottom="@dimen/header_logo_margin_bottom" + android:layout_below="@+id/brand_logo"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="@dimen/page_title_height" + style="@style/PageTitle" /> + +</RelativeLayout>
\ No newline at end of file diff --git a/res/layout-land/setup_welcome_page.xml b/res/layout-land/setup_welcome_page.xml new file mode 100644 index 0000000..a3afa51 --- /dev/null +++ b/res/layout-land/setup_welcome_page.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2013 The CyanogenMod 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:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/logo_header" /> + + <RelativeLayout android:id="@+id/page" + android:layout_width="0px" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_left" + style="@style/PageContent"> + + <com.cyanogenmod.setupwizard.ui.LocalePicker + android:id="@+id/locale_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="@dimen/min_locale_picker_height" + android:focusable="true" + android:focusableInTouchMode="true" + android:layout_centerInParent="true"/> + + </RelativeLayout> + +</LinearLayout> diff --git a/res/layout/choose_data_sim_page.xml b/res/layout/choose_data_sim_page.xml index 95162d3..67963f2 100644 --- a/res/layout/choose_data_sim_page.xml +++ b/res/layout/choose_data_sim_page.xml @@ -14,31 +14,44 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:id="@+id/page_view" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/PageSummaryText" - android:textSize="15sp" - android:paddingTop="@dimen/content_margin_top" - android:paddingLeft="@dimen/content_margin_left" - android:paddingRight="@dimen/content_margin_right" - android:paddingBottom="@dimen/summary_margin_bottom" - android:text="@string/choose_data_sim_summary" /> - - <include layout="@layout/divider" /> - - </LinearLayout> -</ScrollView> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/header" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:id="@+id/page_view" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageContent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageSummaryText" + android:textSize="15sp" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + android:paddingBottom="@dimen/summary_margin_bottom" + android:text="@string/choose_data_sim_summary" /> + + <include layout="@layout/divider" /> + + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout> diff --git a/res/layout/header.xml b/res/layout/header.xml index 2e76a08..396bf3b 100644 --- a/res/layout/header.xml +++ b/res/layout/header.xml @@ -15,8 +15,10 @@ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/header" android:layout_width="match_parent" - android:layout_height="@dimen/header_height"> + android:layout_height="@dimen/header_height" + style="@style/Header"> <TextView android:layout_width="match_parent" diff --git a/res/layout/header_condensed.xml b/res/layout/header_condensed.xml index c47062c..955d50c 100644 --- a/res/layout/header_condensed.xml +++ b/res/layout/header_condensed.xml @@ -15,8 +15,10 @@ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/header" android:layout_width="match_parent" - android:layout_height="@dimen/page_title_height"> + android:layout_height="@dimen/page_title_height" + style="@style/Header"> <TextView android:layout_width="match_parent" diff --git a/res/layout/location_settings.xml b/res/layout/location_settings.xml index 393a180..0b344cc 100644 --- a/res/layout/location_settings.xml +++ b/res/layout/location_settings.xml @@ -14,127 +14,145 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - style="@style/PageContent"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="15sp" - android:layout_marginBottom="@dimen/summary_margin_bottom" - style="@style/PageSummaryText" - android:text="@string/location_services_summary" /> - - <LinearLayout - android:id="@+id/location" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - - <CheckBox - android:id="@+id/location_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false" /> - - <TextView - android:id="@+id/location_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/location_access_summary" - android:maxLines="5" /> - - </LinearLayout> - - <LinearLayout - android:id="@+id/gps" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - <CheckBox - android:id="@+id/gps_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false" /> - - - <TextView - android:id="@+id/gps_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/location_gps" - android:maxLines="5" /> - - </LinearLayout> - - <LinearLayout - android:id="@+id/network" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - <CheckBox - android:id="@+id/network_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false" /> - - <TextView - android:id="@+id/network_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/location_network" - android:maxLines="5" /> - - </LinearLayout> - </LinearLayout> -</ScrollView> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/header_condensed" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + style="@style/PageContent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="15sp" + android:layout_marginBottom="@dimen/summary_margin_bottom" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + style="@style/PageSummaryText" + android:text="@string/location_services_summary" /> + + <LinearLayout + android:id="@+id/location" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + + <CheckBox + android:id="@+id/location_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false" /> + + <TextView + android:id="@+id/location_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/location_access_summary" + android:maxLines="5" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/gps" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + <CheckBox + android:id="@+id/gps_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false" /> + + + <TextView + android:id="@+id/gps_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/location_gps" + android:maxLines="5" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/network" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + <CheckBox + android:id="@+id/network_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false" /> + + <TextView + android:id="@+id/network_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/location_network" + android:maxLines="5" /> + + </LinearLayout> + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout> diff --git a/res/layout/logo_header.xml b/res/layout/logo_header.xml index 5aa8df4..c8fbaaa 100644 --- a/res/layout/logo_header.xml +++ b/res/layout/logo_header.xml @@ -15,8 +15,10 @@ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/header" android:layout_width="match_parent" - android:layout_height="@dimen/logo_header_height"> + android:layout_height="@dimen/logo_header_height" + style="@style/Header"> <ImageView android:id="@+id/brand_logo" diff --git a/res/layout/mobile_data_settings.xml b/res/layout/mobile_data_settings.xml index 2ac3b35..842fbce 100644 --- a/res/layout/mobile_data_settings.xml +++ b/res/layout/mobile_data_settings.xml @@ -14,70 +14,83 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <TextView - android:id="@+id/mobile_data_summary" - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/PageSummaryText" - android:textSize="15sp" - android:paddingTop="@dimen/content_margin_top" - android:paddingLeft="@dimen/content_margin_left" - android:paddingRight="@dimen/content_margin_right" - android:paddingBottom="@dimen/summary_margin_bottom" - android:text="@string/enable_mobile_data_summary" /> - - <include layout="@layout/divider" /> - - <LinearLayout - android:id="@+id/data" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:gravity="center_vertical" - android:paddingLeft="@dimen/content_margin_left" - android:paddingRight="@dimen/data_switch_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - <ImageView - android:id="@+id/signal" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_signal_0" /> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/header" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> - <TextView - android:id="@+id/enable_data_title" - android:layout_width="0px" + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="14sp" - android:layout_marginLeft="@dimen/carrier_text_margin_left" - android:text="@string/setup_mobile_data_no_service" - android:maxLines="4" /> - - <Switch - android:id="@+id/data_switch" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:gravity="center_vertical" - android:duplicateParentState="true" - android:clickable="false" - android:textOff="@string/enable_mobile_off" - android:textOn="@string/enable_mobile_on"/> - </LinearLayout> - - <include layout="@layout/divider" /> - - </LinearLayout> -</ScrollView> + style="@style/PageContent"> + + <TextView + android:id="@+id/mobile_data_summary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageSummaryText" + android:textSize="15sp" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + android:paddingBottom="@dimen/summary_margin_bottom" + android:text="@string/enable_mobile_data_summary" /> + + <include layout="@layout/divider" /> + + <LinearLayout + android:id="@+id/data" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:gravity="center_vertical" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/data_switch_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + <ImageView + android:id="@+id/signal" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_signal_0" /> + + <TextView + android:id="@+id/enable_data_title" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="14sp" + android:layout_marginLeft="@dimen/carrier_text_margin_left" + android:text="@string/setup_mobile_data_no_service" + android:maxLines="4" /> + + <Switch + android:id="@+id/data_switch" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center_vertical" + android:duplicateParentState="true" + android:clickable="false" + android:textOff="@string/enable_mobile_off" + android:textOn="@string/enable_mobile_on"/> + </LinearLayout> + + <include layout="@layout/divider" /> + + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout> diff --git a/res/layout/setup_cyanogen_services.xml b/res/layout/setup_cyanogen_services.xml index 2f705ba..801e198 100644 --- a/res/layout/setup_cyanogen_services.xml +++ b/res/layout/setup_cyanogen_services.xml @@ -14,133 +14,152 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - style="@style/PageContent"> - - <!-- The caption about privacy policy --> - <TextView - android:id="@+id/privacy_policy" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="15sp" - android:layout_marginBottom="@dimen/summary_margin_bottom" - style="@style/PageSummaryText" - android:text="@string/services_explanation" - android:clickable="true"/> - - <!-- Whether or not to enable metrics --> - <LinearLayout - android:id="@+id/metrics" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - - <CheckBox - android:id="@+id/enable_metrics_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false"/> - - <TextView - android:id="@+id/enable_metrics_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_metrics_label" - android:maxLines="5" /> - - </LinearLayout> - - <!-- Checkbox for using on-screen nav keys --> - <LinearLayout - android:id="@+id/nav_keys" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - <CheckBox - android:id="@+id/nav_keys_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false" /> - - - <TextView - android:id="@+id/nav_keys_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_os_nav_keys_label" - android:maxLines="5" /> - - </LinearLayout> - - <!-- Checkbox for enabling secure SMS --> - <LinearLayout - android:id="@+id/secure_sms" - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/location_margin_left" - android:layout_marginRight="@dimen/content_margin_right" - android:background="?android:attr/selectableItemBackground" - android:clickable="true"> - - <CheckBox - android:id="@+id/secure_sms_checkbox" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="top" - android:layout_marginTop="5dp" - android:duplicateParentState="true" - android:clickable="false" /> - - <TextView - android:id="@+id/secure_sms_summary" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textSize="15sp" - android:gravity="top" - android:layout_marginLeft="@dimen/location_text_margin_left" - android:layout_marginRight="@dimen/location_text_margin_right" - android:paddingBottom="@dimen/content_margin_bottom" - android:text="@string/services_secure_sms_label" - android:maxLines="5" /> - - </LinearLayout> - </LinearLayout> -</ScrollView> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + <include layout="@layout/header_condensed" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + style="@style/PageContent"> + + <!-- The caption about privacy policy --> + <TextView + android:id="@+id/privacy_policy" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="15sp" + android:layout_marginBottom="@dimen/summary_margin_bottom" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + style="@style/PageSummaryText" + android:text="@string/services_explanation" + android:clickable="true"/> + + <!-- Whether or not to enable metrics --> + <LinearLayout + android:id="@+id/metrics" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + + <CheckBox + android:id="@+id/enable_metrics_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false"/> + + <TextView + android:id="@+id/enable_metrics_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/services_metrics_label" + android:maxLines="5" /> + + </LinearLayout> + + <!-- Checkbox for using on-screen nav keys --> + <LinearLayout + android:id="@+id/nav_keys" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + <CheckBox + android:id="@+id/nav_keys_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false" /> + + + <TextView + android:id="@+id/nav_keys_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/services_os_nav_keys_label" + android:maxLines="5" /> + + </LinearLayout> + + <!-- Checkbox for enabling secure SMS --> + <LinearLayout + android:id="@+id/secure_sms" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/location_margin_left" + android:layout_marginRight="@dimen/content_margin_right" + android:background="?android:attr/selectableItemBackground" + android:clickable="true"> + + <CheckBox + android:id="@+id/secure_sms_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top" + android:layout_marginTop="5dp" + android:duplicateParentState="true" + android:clickable="false" /> + + <TextView + android:id="@+id/secure_sms_summary" + android:layout_width="0px" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textSize="15sp" + android:lineSpacingExtra="@dimen/setup_line_spacing" + android:gravity="top" + android:layout_marginLeft="@dimen/location_text_margin_left" + android:layout_marginRight="@dimen/location_text_margin_right" + android:paddingBottom="@dimen/content_margin_bottom" + android:text="@string/services_secure_sms_label" + android:maxLines="5" /> + + </LinearLayout> + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/setup_datetime_page.xml b/res/layout/setup_datetime_page.xml index 2622dad..46373f8 100644 --- a/res/layout/setup_datetime_page.xml +++ b/res/layout/setup_datetime_page.xml @@ -14,85 +14,100 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/PageContent"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/PageSummaryText" - android:textSize="16sp" - android:layout_marginBottom="@dimen/summary_margin_bottom" - android:paddingRight="@dimen/location_text_margin_right" - android:text="@string/date_time_summary" /> - - <Spinner - android:id="@+id/timezone_list" - android:layout_width="290dp" - android:layout_height="wrap_content" - android:saveEnabled="false"/> - - <TwoLineListItem - android:id="@+id/date_item" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:mode="twoLine" - android:clickable="true" - android:background="?android:attr/selectableItemBackground" - android:gravity="center_vertical"> - - <TextView - android:id="@+id/date_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/setup_current_date" - style="@style/SpinnerItem" /> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> - <TextView - android:id="@+id/date_text" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/date_title" - android:layout_alignStart="@id/date_title" - android:fontFamily="sans-serif-medium" - style="@style/SpinnerItem" /> - </TwoLineListItem> - - <TwoLineListItem - android:id="@+id/time_item" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:mode="twoLine" - android:clickable="true" - android:background="?android:attr/selectableItemBackground" - android:gravity="center_vertical"> - - <TextView - android:id="@+id/time_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/setup_current_time" - style="@style/SpinnerItem" /> + <include layout="@layout/header" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> - <TextView - android:id="@+id/time_text" + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/time_title" - android:layout_alignStart="@id/time_title" - android:fontFamily="sans-serif-medium" - style="@style/SpinnerItem" /> - </TwoLineListItem> - - </LinearLayout> -</ScrollView> + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + style="@style/PageContent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageSummaryText" + android:textSize="16sp" + android:layout_marginBottom="@dimen/summary_margin_bottom" + android:paddingRight="@dimen/location_text_margin_right" + android:text="@string/date_time_summary" /> + + <Spinner + android:id="@+id/timezone_list" + android:layout_width="290dp" + android:layout_height="wrap_content" + android:saveEnabled="false"/> + + <TwoLineListItem + android:id="@+id/date_item" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:mode="twoLine" + android:clickable="true" + android:background="?android:attr/selectableItemBackground" + android:gravity="center_vertical"> + + <TextView + android:id="@+id/date_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/setup_current_date" + style="@style/SpinnerItem" /> + + <TextView + android:id="@+id/date_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/date_title" + android:layout_alignStart="@id/date_title" + android:fontFamily="sans-serif-medium" + style="@style/SpinnerItem" /> + </TwoLineListItem> + + <TwoLineListItem + android:id="@+id/time_item" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:mode="twoLine" + android:clickable="true" + android:background="?android:attr/selectableItemBackground" + android:gravity="center_vertical"> + + <TextView + android:id="@+id/time_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/setup_current_time" + style="@style/SpinnerItem" /> + + <TextView + android:id="@+id/time_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/time_title" + android:layout_alignStart="@id/time_title" + android:fontFamily="sans-serif-medium" + style="@style/SpinnerItem" /> + </TwoLineListItem> + + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/setup_finalizing.xml b/res/layout/setup_finalizing.xml deleted file mode 100644 index 60a30d7..0000000 --- a/res/layout/setup_finalizing.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" android:layout_width="wrap_content" - android:layout_height="wrap_content"> - - <ProgressBar - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:indeterminate="true" - style="@android:style/Widget.Material.ProgressBar.Horizontal" /> - -</LinearLayout>
\ No newline at end of file diff --git a/res/layout/setup_finished_page.xml b/res/layout/setup_finished_page.xml index a641edf..44f0da2 100644 --- a/res/layout/setup_finished_page.xml +++ b/res/layout/setup_finished_page.xml @@ -17,16 +17,31 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/primary"> + android:layout_height="match_parent"> - <ImageView - android:id="@+id/brand_logo" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:src="@drawable/brand_finish" - android:scaleType="centerInside"/> + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> -</LinearLayout> + <LinearLayout android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/primary"> + <ImageView + android:id="@+id/brand_logo" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:src="@drawable/brand_finish" + android:scaleType="centerInside"/> + </LinearLayout> + + <ImageView android:id="@+id/reveal" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/reveal" + android:visibility="invisible"/> + </FrameLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/setup_main.xml b/res/layout/setup_main.xml index c29af05..5fb5748 100644 --- a/res/layout/setup_main.xml +++ b/res/layout/setup_main.xml @@ -18,29 +18,14 @@ android:id="@+id/root" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent" - style="@style/RootView"> + android:layout_height="match_parent"> - <LinearLayout android:id="@+id/page" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" - style="@style/PageContainer" > - - <FrameLayout - android:id="@+id/header" - android:layout_width="match_parent" - android:layout_height="wrap_content" - style="@style/Header"/> - - <FrameLayout + <FrameLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_weight="1"/> - - </LinearLayout> + android:layout_weight="1" + style="@style/PageContainer"/> <include layout="@layout/button_bar" /> diff --git a/res/layout/setup_welcome_page.xml b/res/layout/setup_welcome_page.xml index 80bc669..dc2d499 100644 --- a/res/layout/setup_welcome_page.xml +++ b/res/layout/setup_welcome_page.xml @@ -14,19 +14,31 @@ See the License for the specific language governing permissions and limitations under the License. --> -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/header" - android:layout_width="match_parent" - android:layout_height="match_parent" - style="@style/PageContent"> - - <com.cyanogenmod.setupwizard.ui.LocalePicker - android:id="@+id/locale_list" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginRight="12dp" - android:gravity="left" - android:focusable="true" - android:focusableInTouchMode="true"/> - -</FrameLayout> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/logo_header" /> + + <RelativeLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:gravity="center" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_left" + style="@style/PageContent"> + + <com.cyanogenmod.setupwizard.ui.LocalePicker + android:id="@+id/locale_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="@dimen/min_locale_picker_height" + android:focusable="true" + android:focusableInTouchMode="true" + android:layout_centerInParent="true"/> + + </RelativeLayout> + +</LinearLayout> diff --git a/res/layout/sim_missing_page.xml b/res/layout/sim_missing_page.xml index 789de85..d69d1c1 100644 --- a/res/layout/sim_missing_page.xml +++ b/res/layout/sim_missing_page.xml @@ -14,36 +14,50 @@ See the License for the specific language governing permissions and limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/sim_missing" - style="@style/PageSummaryText" - android:textSize="15sp" - android:layout_marginBottom="@dimen/summary_margin_bottom" - android:paddingTop="@dimen/content_margin_top" - android:paddingLeft="@dimen/content_margin_left" - android:paddingRight="@dimen/content_margin_right" - android:text="@string/sim_missing_summary" /> - - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:src="@drawable/sim_back"/> - - </LinearLayout> -</ScrollView> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/header" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageContent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/sim_missing" + style="@style/PageSummaryText" + android:textSize="15sp" + android:layout_marginBottom="@dimen/summary_margin_bottom" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/content_margin_right" + android:text="@string/sim_missing_summary" /> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:src="@drawable/sim_back"/> + + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout> + diff --git a/res/values-land/colors.xml b/res/values-land/colors.xml new file mode 100644 index 0000000..c18f003 --- /dev/null +++ b/res/values-land/colors.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2013 The CyanogenMod 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. +--> +<resources> + <color name="status_bar">@color/primary_dark</color> +</resources> diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index deac1a4..fb4e588 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -15,5 +15,5 @@ limitations under the License. --> <resources> - + <dimen name="header_height">@dimen/page_title_height</dimen> </resources> diff --git a/res/values/colors.xml b/res/values/colors.xml index 951d28e..89f30c6 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -20,10 +20,11 @@ <color name="window_background">#e4e7e8</color> <color name="page_background">#efefef</color> - <color name="primary">#2196f3</color> - <color name="primary_dark">#1481d8</color> + <color name="primary">#00B1E5</color> + <color name="primary_dark">#00A2E5</color> <color name="accent">#009789</color> <color name="primary_text">#8a000000</color> <color name="secondary_text">#727272</color> <color name="divider">#40000000</color> + <color name="status_bar">@color/primary</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index c0c91e8..d3c34d8 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -15,12 +15,13 @@ limitations under the License. --> <resources> - <dimen name="logo_header_height">290dp</dimen> + <dimen name="logo_header_height">220dp</dimen> <dimen name="header_height">220dp</dimen> <dimen name="page_title_height">56dp</dimen> <dimen name="header_title_margin_left">26dp</dimen> <dimen name="header_logo_margin_left">25dp</dimen> <dimen name="header_logo_margin_bottom">11dp</dimen> + <dimen name="header_logo_margin_top">30dp</dimen> <dimen name="content_margin_top">26dp</dimen> <dimen name="content_margin_left">26dp</dimen> <dimen name="content_margin_right">14dp</dimen> @@ -31,4 +32,6 @@ <dimen name="location_text_margin_right">30dp</dimen> <dimen name="data_switch_margin_right">30dp</dimen> <dimen name="carrier_text_margin_left">15dp</dimen> + <dimen name="setup_line_spacing">3sp</dimen> + <dimen name="min_locale_picker_height">100dp</dimen> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index bda7eac..31c0da7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -49,9 +49,9 @@ <string name="date_time_summary">Set your time zone and adjust current date and time if needed</string> <string name="location_services_summary">Location services allows Maps and other apps to gather and use data such as your approximate location. For example, Maps may use your approximate location to locate nearby coffee shops.</string> - <string name="location_access_summary">Allow apps that have asked your permission to use your location information. This may include your current location and past locations.</string> - <string name="location_gps">Improve location accuracy by allowing apps to use the GPS on your phone.</string> - <string name="location_network">Use Google\'s location service to help apps determine your location. This means sending annonymous location data to Google, even when no apps are running.</string> + <string name="location_access_summary"><b>Allow apps that have asked your permission</b> to use your location information. This may include your current location and past locations.</string> + <string name="location_gps"><b>Improve location accuracy</b> by allowing apps to use the GPS on your phone.</string> + <string name="location_network"><b>Use Google\'s location service</b> to help apps determine your location. This means sending annonymous location data to Google, even when no apps are running.</string> <string name="setup_mobile_data">Turn On Mobile Data</string> <string name="setup_mobile_data_no_service">No service</string> diff --git a/res/values/styles.xml b/res/values/styles.xml index b42d118..36dda1d 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -18,17 +18,15 @@ <style name="Theme.Setup" parent="@android:style/Theme.Material.Light"> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> + <item name="android:windowBackground">@color/primary</item> <item name="android:windowActivityTransitions">true</item> <item name="android:windowContentTransitions">true</item> + <item name="android:windowExitTransition">@android:transition/explode</item> <item name="android:colorPrimary">@color/primary</item> - <item name="android:colorPrimaryDark">@color/primary</item> + <item name="android:colorPrimaryDark">#00000000</item> <item name="android:colorAccent">@color/accent</item> </style> - <style name="RootView"> - <item name="android:background">@color/window_background</item> - </style> - <style name="Header"> <item name="android:elevation">4dp</item> <item name="android:background">@color/primary</item> @@ -36,13 +34,11 @@ <style name="PageContainer"> <item name="android:textColor">@color/primary_text</item> - <item name="android:background">@color/page_background</item> </style> <style name="PageContent"> + <item name="android:background">@color/page_background</item> <item name="android:paddingTop">@dimen/content_margin_top</item> - <item name="android:paddingLeft">@dimen/content_margin_left</item> - <item name="android:paddingRight">@dimen/content_margin_right</item> </style> <style name="PageTitle"> @@ -57,6 +53,7 @@ <style name="PageSummaryText"> <item name="android:id">@android:id/summary</item> + <item name="android:lineSpacingExtra">@dimen/setup_line_spacing</item> </style> <style name="SpinnerItem"> diff --git a/src/com/cyanogenmod/setupwizard/setup/AbstractSetupData.java b/src/com/cyanogenmod/setupwizard/setup/AbstractSetupData.java index fed8732..c388eef 100644 --- a/src/com/cyanogenmod/setupwizard/setup/AbstractSetupData.java +++ b/src/com/cyanogenmod/setupwizard/setup/AbstractSetupData.java @@ -18,7 +18,6 @@ package com.cyanogenmod.setupwizard.setup; import android.content.Context; import android.os.Bundle; -import android.view.LayoutInflater; import java.util.ArrayList; @@ -104,10 +103,6 @@ public abstract class AbstractSetupData implements SetupDataCallbacks { } } - @Override - public void onPageViewCreated(LayoutInflater inflater, Bundle savedInstanceState, - int layoutResource) {} - private boolean advanceToNextUncompleted() { while (mCurrentPageIndex < mPageList.size()) { mCurrentPageIndex++; diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java index 2949b9e..6b87bc3 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java @@ -17,8 +17,6 @@ package com.cyanogenmod.setupwizard.setup; import android.accounts.AccountManager; -import android.accounts.AccountManagerCallback; -import android.accounts.AccountManagerFuture; import android.app.Activity; import android.app.Fragment; import android.content.Context; @@ -137,8 +135,6 @@ public class CyanogenServicesPage extends SetupPage { private CheckBox mNavKeys; private CheckBox mSecureSms; - private Runnable mDeferredAction; - private Handler mHandler; @@ -251,22 +247,9 @@ public class CyanogenServicesPage extends SetupPage { } @Override - protected int getHeaderLayoutResource() { - return R.layout.header_condensed; - } - - @Override public void onResume() { super.onResume(); updateDisableNavkeysOption(); - runDeferredAction(); - } - - private void runDeferredAction() { - if (mDeferredAction != null) { - mDeferredAction.run(); - mDeferredAction = null; - } } private void updateDisableNavkeysOption() { @@ -279,28 +262,9 @@ public class CyanogenServicesPage extends SetupPage { private void launchCyanogenAccountSetup(final Activity activity) { Bundle bundle = new Bundle(); bundle.putBoolean(SetupWizardApp.EXTRA_FIRST_RUN, true); - AccountManager - .get(activity).addAccount(SetupWizardApp.ACCOUNT_TYPE_CYANOGEN, null, null, bundle, - activity, new AccountManagerCallback<Bundle>() { - @Override - public void run(AccountManagerFuture<Bundle> bundleAccountManagerFuture) { - if (activity == null) return; //There is a chance this activity has been torn down. - Runnable runnable = new Runnable() { - @Override - public void run() { - if (!SetupWizardUtils.accountExists(activity, - SetupWizardApp.ACCOUNT_TYPE_CYANOGEN)) { - mPage.getCallbacks().onNextPage(); - } - } - }; - if (activity.isResumed()) { - runnable.run(); - } else { - mDeferredAction = runnable; - } - } - }, null); + AccountManager.get(activity) + .addAccount(SetupWizardApp.ACCOUNT_TYPE_CYANOGEN, null, null, bundle, + activity, null, null); } } diff --git a/src/com/cyanogenmod/setupwizard/setup/FinishPage.java b/src/com/cyanogenmod/setupwizard/setup/FinishPage.java index 1ab0df9..d97ada5 100644 --- a/src/com/cyanogenmod/setupwizard/setup/FinishPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/FinishPage.java @@ -19,14 +19,20 @@ package com.cyanogenmod.setupwizard.setup; import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.ui.SetupPageFragment; +import android.animation.Animator; import android.app.Fragment; import android.content.Context; import android.os.Bundle; +import android.os.Handler; +import android.view.View; +import android.view.ViewAnimationUtils; public class FinishPage extends SetupPage { public static final String TAG = "FinishPage"; + private FinishFragment mFinishFragment; + public FinishPage(Context context, SetupDataCallbacks callbacks) { super(context, callbacks); } @@ -36,9 +42,9 @@ public class FinishPage extends SetupPage { Bundle args = new Bundle(); args.putString(SetupPage.KEY_PAGE_ARGUMENT, getKey()); - FinishFragment fragment = new FinishFragment(); - fragment.setArguments(args); - return fragment; + mFinishFragment = new FinishFragment(); + mFinishFragment.setArguments(args); + return mFinishFragment; } @Override @@ -53,7 +59,7 @@ public class FinishPage extends SetupPage { @Override public boolean doNextAction() { - getCallbacks().onFinish(); + mFinishFragment.animateOut(getCallbacks()); return true; } @@ -69,17 +75,57 @@ public class FinishPage extends SetupPage { public static class FinishFragment extends SetupPageFragment { + private View mReveal; + + private Handler mHandler; + @Override - protected void initializePage() {} + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + mHandler = new Handler(); + getActivity().getWindow().setStatusBarColor(getResources().getColor(R.color.primary)); + } @Override - protected int getLayoutResource() { - return R.layout.setup_finished_page; + protected void initializePage() { + mReveal = mRootView.findViewById(R.id.reveal); + } + + private void animateOut(final SetupDataCallbacks callbacks) { + int cx = (mReveal.getLeft() + mReveal.getRight()) / 2; + int cy = (mReveal.getTop() + mReveal.getBottom()) / 2; + int finalRadius = Math.max(mReveal.getWidth(), mReveal.getHeight()); + Animator anim = + ViewAnimationUtils.createCircularReveal(mReveal, cx, cy, 0, finalRadius); + + anim.addListener(new Animator.AnimatorListener() { + @Override + public void onAnimationStart(Animator animation) { + mReveal.setVisibility(View.VISIBLE); + } + + @Override + public void onAnimationEnd(Animator animation) { + mHandler.post(new Runnable() { + @Override + public void run() { + callbacks.onFinish(); + } + }); + } + + @Override + public void onAnimationCancel(Animator animation) {} + + @Override + public void onAnimationRepeat(Animator animation) {} + }); + anim.start(); } @Override - protected int getHeaderLayoutResource() { - return -1; + protected int getLayoutResource() { + return R.layout.setup_finished_page; } } diff --git a/src/com/cyanogenmod/setupwizard/setup/LocationSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/LocationSettingsPage.java index 00865f4..ff87054 100644 --- a/src/com/cyanogenmod/setupwizard/setup/LocationSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/LocationSettingsPage.java @@ -128,11 +128,6 @@ public class LocationSettingsPage extends SetupPage { } @Override - protected int getHeaderLayoutResource() { - return R.layout.header_condensed; - } - - @Override public void onResume() { super.onResume(); updateLocationToggles(); diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupDataCallbacks.java b/src/com/cyanogenmod/setupwizard/setup/SetupDataCallbacks.java index 2e787b4..d12da2c 100644 --- a/src/com/cyanogenmod/setupwizard/setup/SetupDataCallbacks.java +++ b/src/com/cyanogenmod/setupwizard/setup/SetupDataCallbacks.java @@ -16,9 +16,6 @@ package com.cyanogenmod.setupwizard.setup; -import android.os.Bundle; -import android.view.LayoutInflater; - public interface SetupDataCallbacks { void onNextPage(); void onPreviousPage(); @@ -27,5 +24,4 @@ public interface SetupDataCallbacks { void onFinish(); Page getPage(String key); Page getPage(int key); - void onPageViewCreated(LayoutInflater inflater, Bundle savedInstanceState, int layoutResource); } diff --git a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java index 4c64d5c..60322bf 100644 --- a/src/com/cyanogenmod/setupwizard/setup/SetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/SetupPage.java @@ -21,10 +21,12 @@ import com.cyanogenmod.setupwizard.R; import android.app.Activity; import android.app.Fragment; import android.app.FragmentManager; -import android.app.FragmentTransaction; import android.content.Context; import android.content.Intent; import android.os.Bundle; +import android.transition.Slide; +import android.transition.Transition; +import android.view.Gravity; public abstract class SetupPage implements Page { @@ -71,14 +73,19 @@ public abstract class SetupPage implements Page { public void doLoadAction(Activity context, int action) { if (context == null || context.isFinishing()) { return; } final FragmentManager fragmentManager = context.getFragmentManager(); + Fragment fragment = getFragment(); if (action == Page.ACTION_NEXT) { - FragmentTransaction transaction = fragmentManager.beginTransaction(); - transaction.replace(R.id.content, getFragment(), getKey()); - transaction.commit(); + Transition t = new Slide(Gravity.RIGHT); + fragment.setEnterTransition(t); + fragmentManager.beginTransaction() + .replace(R.id.content,fragment, getKey()) + .commit(); } else { - FragmentTransaction transaction = fragmentManager.beginTransaction(); - transaction.replace(R.id.content, getFragment(), getKey()); - transaction.commit(); + Transition t = new Slide(Gravity.LEFT); + fragment.setEnterTransition(t); + fragmentManager.beginTransaction() + .replace(R.id.content, fragment, getKey()) + .commit(); } } diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java index 569f7b9..fea1ffa 100644 --- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java +++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java @@ -97,6 +97,12 @@ public class WelcomePage extends SetupPage { }; @Override + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + getActivity().getWindow().setStatusBarColor(getResources().getColor(R.color.primary)); + } + + @Override protected void initializePage() { mLanguagePicker = (LocalePicker) mRootView.findViewById(R.id.locale_list); loadLanguages(); @@ -152,10 +158,6 @@ public class WelcomePage extends SetupPage { return R.layout.setup_welcome_page; } - @Override - protected int getHeaderLayoutResource() { - return R.layout.logo_header; - } } } diff --git a/src/com/cyanogenmod/setupwizard/ui/LocalePicker.java b/src/com/cyanogenmod/setupwizard/ui/LocalePicker.java index 049476c..50682ab 100644 --- a/src/com/cyanogenmod/setupwizard/ui/LocalePicker.java +++ b/src/com/cyanogenmod/setupwizard/ui/LocalePicker.java @@ -585,11 +585,7 @@ public class LocalePicker extends LinearLayout { mSelectionDivider = context.getDrawable(com.cyanogenmod.setupwizard.R.drawable.divider); - final int defSelectionDividerHeight = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, UNSCALED_DEFAULT_SELECTION_DIVIDER_HEIGHT, - getResources().getDisplayMetrics()); - mSelectionDividerHeight = attributesArray.getDimensionPixelSize( - R.styleable.NumberPicker_selectionDividerHeight, defSelectionDividerHeight); + mSelectionDividerHeight = UNSCALED_DEFAULT_SELECTION_DIVIDER_HEIGHT; final int defSelectionDividerDistance = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, UNSCALED_DEFAULT_SELECTION_DIVIDERS_DISTANCE, diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java index c16ad37..61f1318 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java @@ -22,6 +22,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.setup.Page; @@ -33,6 +34,8 @@ public abstract class SetupPageFragment extends Fragment { protected String mKey; protected Page mPage; protected View mRootView; + protected TextView mTitleView; + protected ViewGroup mHeaderView; @Override public void onCreate(Bundle savedInstanceState) { @@ -48,7 +51,9 @@ public abstract class SetupPageFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mRootView = inflater.inflate(getLayoutResource(), container, false); - mCallbacks.onPageViewCreated(inflater, savedInstanceState, getHeaderLayoutResource()); + mTitleView = (TextView) mRootView.findViewById(android.R.id.title); + mHeaderView = (ViewGroup ) mRootView.findViewById(R.id.header); + getActivity().startPostponedEnterTransition(); return mRootView; } @@ -56,9 +61,12 @@ public abstract class SetupPageFragment extends Fragment { public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mPage = mCallbacks.getPage(mKey); + if (mTitleView != null) { + mTitleView.setText(mPage.getTitleResId()); + } initializePage(); mCallbacks.onPageLoaded(mPage); - getActivity().getWindow().setStatusBarColor(getResources().getColor(R.color.primary)); + getActivity().getWindow().setStatusBarColor(getResources().getColor(R.color.status_bar)); } @Override @@ -76,10 +84,6 @@ public abstract class SetupPageFragment extends Fragment { mCallbacks = null; } - protected int getHeaderLayoutResource() { - return R.layout.header; - } - protected abstract void initializePage(); protected abstract int getLayoutResource(); diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java index a1c3637..b8e5b48 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java @@ -19,7 +19,9 @@ package com.cyanogenmod.setupwizard.ui; import android.app.Activity; import android.app.AppGlobals; import android.content.Intent; +import android.content.res.Configuration; import android.content.res.Resources; +import android.graphics.drawable.GradientDrawable; import android.os.Bundle; import android.provider.Settings; import android.util.Log; @@ -45,11 +47,8 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks private static final String TAG = SetupWizardActivity.class.getSimpleName(); private View mRootView; - private View mPageView; private Button mNextButton; private Button mPrevButton; - private TextView mTitleView; - private ViewGroup mHeaderView; private AbstractSetupData mSetupData; @@ -57,13 +56,11 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks super.onCreate(savedInstanceState); setContentView(R.layout.setup_main); mRootView = findViewById(R.id.root); - mPageView = findViewById(R.id.page); ((SetupWizardApp)getApplicationContext()).disableStatusBar(); mSetupData = (AbstractSetupData)getLastNonConfigurationInstance(); if (mSetupData == null) { mSetupData = new CMSetupWizardData(this); } - mHeaderView = (ViewGroup)findViewById(R.id.header); mNextButton = (Button) findViewById(R.id.next_button); mPrevButton = (Button) findViewById(R.id.prev_button); mSetupData.registerListener(this); @@ -118,24 +115,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks @Override public void onBackPressed() { - mSetupData.onPreviousPage(); - } - - @Override - public void onPageViewCreated(LayoutInflater inflater, Bundle savedInstanceState, - int layoutResource) { - if (layoutResource != -1) { - mHeaderView.setVisibility(View.VISIBLE); - mHeaderView.removeAllViews(); - inflater.inflate(layoutResource, mHeaderView, true); - } else { - mHeaderView.setVisibility(View.GONE); - } - mTitleView = (TextView) findViewById(android.R.id.title); - if (mTitleView != null) { - Page page = mSetupData.getCurrentPage(); - mTitleView.setText(page.getTitleResId()); - } + if (!mSetupData.isFirstPage()) { + mSetupData.onPreviousPage(); + } } @Override @@ -152,6 +134,14 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks @Override public void onPageLoaded(Page page) { + if (getResources().getConfiguration().orientation + == Configuration.ORIENTATION_LANDSCAPE && + mSetupData.isFirstPage()) { + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + | View.SYSTEM_UI_FLAG_FULLSCREEN); + } else { + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); + } updateButtonBar(); } @@ -179,18 +169,12 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks if (mSetupData.isLastPage()) { mPrevButton.setVisibility(View.INVISIBLE); mRootView.setBackgroundColor(resources.getColor(R.color.primary)); - mPageView.setBackgroundColor(resources.getColor(R.color.primary)); mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null, getDrawable(R.drawable.ic_chevron_right_wht), null); mNextButton.setTextColor(resources.getColor(R.color.white)); } else { mPrevButton.setVisibility(View.VISIBLE); - mPageView.setBackgroundColor(resources.getColor(R.color.page_background)); - if (mSetupData.isFirstPage()) { - mRootView.setBackgroundColor(resources.getColor(R.color.page_background)); - } else { - mRootView.setBackgroundColor(resources.getColor(R.color.window_background)); - } + mRootView.setBackgroundColor(resources.getColor(R.color.window_background)); mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null, getDrawable(R.drawable.ic_chevron_right_dark), null); mNextButton.setTextColor(resources.getColor(R.color.primary_text)); |