diff options
author | Nebojsa Cvetkovic <nebkat@gmail.com> | 2013-12-31 17:16:15 +0000 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-01-24 16:25:19 -0800 |
commit | 9bbb6cf6d78824d4c68382f33b654c43f4aaa109 (patch) | |
tree | 96cb8961b56871f89949647514be711b161f3697 /res | |
parent | e297d9676bf5d4e7925e51e808bef063d22f2078 (diff) | |
download | android_packages_apps_Trebuchet-9bbb6cf6d78824d4c68382f33b654c43f4aaa109.tar.gz android_packages_apps_Trebuchet-9bbb6cf6d78824d4c68382f33b654c43f4aaa109.tar.bz2 android_packages_apps_Trebuchet-9bbb6cf6d78824d4c68382f33b654c43f4aaa109.zip |
FontStylePreference: Initial preference with choice of font family
Change-Id: Idbb400605e47cd4f64a7edd05ceea05504727efc
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/list_item_checkable.xml | 26 | ||||
-rw-r--r-- | res/layout/preference_font_style.xml | 11 | ||||
-rw-r--r-- | res/values/cm_arrays.xml | 13 | ||||
-rw-r--r-- | res/values/cm_strings.xml | 7 | ||||
-rw-r--r-- | res/values/preferences_defaults.xml | 4 | ||||
-rw-r--r-- | res/xml/preferences_general.xml | 17 |
6 files changed, 71 insertions, 7 deletions
diff --git a/res/layout/list_item_checkable.xml b/res/layout/list_item_checkable.xml new file mode 100644 index 000000000..86d6b1a4c --- /dev/null +++ b/res/layout/list_item_checkable.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> +<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textColor="?android:attr/textColorAlertDialogListItem" + android:gravity="center_vertical" + android:paddingStart="16dip" + android:paddingEnd="16dip" + android:checkMark="?android:attr/listChoiceIndicatorSingle" + android:ellipsize="marquee" /> diff --git a/res/layout/preference_font_style.xml b/res/layout/preference_font_style.xml new file mode 100644 index 000000000..5356ebdf1 --- /dev/null +++ b/res/layout/preference_font_style.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + <ListView android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:choiceMode="singleChoice"/> +</LinearLayout>
\ No newline at end of file diff --git a/res/values/cm_arrays.xml b/res/values/cm_arrays.xml new file mode 100644 index 000000000..580e89317 --- /dev/null +++ b/res/values/cm_arrays.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string-array name="preferences_interface_general_icons_text_font_family_entries"> + <item>Regular</item> + <item>Light</item> + <item>Condensed</item> + </string-array> + <string-array name="preferences_interface_general_icons_text_font_family_values"> + <item>sans-serif</item> + <item>sans-serif-light</item> + <item>sans-serif-condensed</item> + </string-array> +</resources>
\ No newline at end of file diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index d880bfb4b..2dc3fa4bc 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -44,6 +44,9 @@ <!-- General --> <string name="preferences_interface_general_title">General</string> - <string name="preferences_interface_general_large_icons_title">Larger icons</string> - <string name="preferences_interface_general_large_icons_summary">Use extra large application icons in homescreen and drawer</string> + <string name="preferences_interface_general_icons_category">Icons</string> + <string name="preferences_interface_general_icons_large_title">Larger icons</string> + <string name="preferences_interface_general_icons_large_summary">Use extra large application icons in homescreen and drawer</string> + <string name="preferences_interface_general_icons_text_style_title">Text font style</string> + <string name="preferences_interface_general_icons_text_style_summary">Variant and style of font to use for icon text</string> </resources>
\ No newline at end of file diff --git a/res/values/preferences_defaults.xml b/res/values/preferences_defaults.xml index ae2ee8037..9fa44b27e 100644 --- a/res/values/preferences_defaults.xml +++ b/res/values/preferences_defaults.xml @@ -3,5 +3,7 @@ <bool name="preferences_interface_homescreen_search_default">true</bool> <bool name="preferences_interface_homescreen_scrolling_wallpaper_scroll_default">true</bool> <bool name="preferences_interface_homescreen_scrolling_page_outlines_default">@bool/config_workspaceDefaultShowOutlines</bool> - <bool name="preferences_interface_general_large_icons_default">@bool/config_largeIcons</bool> + <bool name="preferences_interface_general_icons_large_default">@bool/config_largeIcons</bool> + <string name="preferences_interface_general_icons_text_font_family_default">sans-serif-condensed</string> + <integer name="preferences_interface_general_icons_text_font_style_default">0</integer> </resources>
\ No newline at end of file diff --git a/res/xml/preferences_general.xml b/res/xml/preferences_general.xml index 58e8a9aea..96b93ec44 100644 --- a/res/xml/preferences_general.xml +++ b/res/xml/preferences_general.xml @@ -18,8 +18,17 @@ xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher3" android:key="ui_general" android:title="@string/preferences_interface_general_title"> - <CheckBoxPreference android:key="ui_general_large_icons" - android:title="@string/preferences_interface_general_large_icons_title" - android:summary="@string/preferences_interface_general_large_icons_summary" - android:defaultValue="@bool/preferences_interface_general_large_icons_default" /> + <PreferenceCategory android:title="@string/preferences_interface_general_icons_category"> + <CheckBoxPreference android:key="ui_general_icons_large" + android:title="@string/preferences_interface_general_icons_large_title" + android:summary="@string/preferences_interface_general_icons_large_summary" + android:defaultValue="@bool/preferences_interface_general_icons_large_default" /> + <com.android.launcher3.settings.FontStylePreference android:key="ui_general_icons_text_font" + android:title="@string/preferences_interface_general_icons_text_style_title" + android:summary="@string/preferences_interface_general_icons_text_style_summary" + android:entries="@array/preferences_interface_general_icons_text_font_family_entries" + android:entryValues="@array/preferences_interface_general_icons_text_font_family_values" + android:defaultValue="@string/preferences_interface_general_icons_text_font_family_default" /> + </PreferenceCategory> + </PreferenceScreen> |