SetupWizard: Add option to apply default theme if one exists

* A bunch of code cleanup/refactoring to make this work

Change-Id: I059fb5fa5bcd7dd8821e993218a320554f10a314
This commit is contained in:
cretin45
2015-02-23 13:52:37 -08:00
parent 1d54e5207a
commit 01f21da16b
23 changed files with 375 additions and 168 deletions

View File

@@ -86,6 +86,42 @@
</LinearLayout>
<!-- Whether or not to enable default theme -->
<LinearLayout
android:id="@+id/theme"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/location_margin_left"
android:paddingRight="@dimen/content_margin_right"
android:background="?android:attr/selectableItemBackground"
android:clickable="true">
<CheckBox
android:id="@+id/enable_theme_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_theme_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"/>
</LinearLayout>
<!-- Checkbox for using on-screen nav keys -->
<LinearLayout
android:id="@+id/nav_keys"

View File

@@ -45,5 +45,13 @@
android:background="@drawable/reveal"
android:visibility="invisible"/>
<ProgressBar
android:id="@+id/finishing_bar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="8dp"
android:layout_gravity="bottom"
android:visibility="gone"/>
</com.cyanogenmod.setupwizard.ui.widget.ScrimInsetsFrameLayout>

View File

@@ -18,6 +18,7 @@
<string name="app_name">Setup Wizard</string>
<string name="product_name" translatable="false">cyanogenmod</string>
<string name="os_name" translatable="false">CyanogenMod</string>
<string name="default_theme_name" translatable="false">Material</string>
<string name="cm_account_type" translatable="false">com.cyanogenmod.account</string>
@@ -67,12 +68,14 @@
<string name="emergency_call">Emergency call</string>
<string name="setup_services">Cyanogen services</string>
<string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. You can turn them off at anytime. Data will be used in accordance with Cyanogen\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. You can turn them off at anytime. Data will be used in accordance with Cyanogen\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="setup_services">Cyanogen features</string>
<string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. Data will be used in accordance with Cyanogen\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. Data will be used in accordance with Cyanogen\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="services_privacy_policy">Privacy Policy</string>
<string name="services_help_improve_cm">Help improve <xliff:g id="name" example="CyanogenMod">%s</xliff:g></string>
<string name="services_metrics_label"><xliff:g id="name" example="Help improve CyanogenMod">%s</xliff:g> by automatically sending diagnostic and usage data to Cyanogen. This information cant be used to identify you and lends a hand to teams working on things like battery life, app performance, and new <xliff:g id="name" example="CyanogenMod">%s</xliff:g> features.</string>
<string name="services_apply_theme">Apply the <xliff:g id="name" example="Material">%s</xliff:g> theme</string>
<string name="services_apply_theme_label"><xliff:g id="name" example="Apply the Material theme">%s</xliff:g> enabling unique icons, wallpapers, and fonts.</string>
<string name="services_os_nav_keys_label"><b>Use on screen navigation keys</b> instead of hardware keys.</string>
<string name="services_use_secure_sms">Use secure SMS</string>
<string name="services_secure_sms_label"><xliff:g id="name" example="Use secure SMS">%s</xliff:g> to encrypt SMS conversations with other users using secure SMS on a <xliff:g id="name" example="CyanogenMod">%s</xliff:g> device.</string>