diff options
author | Anthony Hugh <ahugh@google.com> | 2015-09-14 15:43:25 -0700 |
---|---|---|
committer | Anthony Hugh <ahugh@google.com> | 2015-09-15 18:20:34 -0700 |
commit | 6412dc4a8f47b134af6c5abb5f7f30321bb3ce68 (patch) | |
tree | b5650c28083861a035349f56d491ef7b27ef019b /res | |
parent | 46fed54b3ee49e4bebabca50bcff5bceaece96b8 (diff) | |
download | android_packages_apps_PackageInstaller-6412dc4a8f47b134af6c5abb5f7f30321bb3ce68.tar.gz android_packages_apps_PackageInstaller-6412dc4a8f47b134af6c5abb5f7f30321bb3ce68.tar.bz2 android_packages_apps_PackageInstaller-6412dc4a8f47b134af6c5abb5f7f30321bb3ce68.zip |
Permissions Watch settings UI port
This CL contains all the UI elements needed to build the Wear
version of the Settings UI for permissions.
The actual implementation for the Wear version of SettingsUI
will be done in a follow up bug.
This is basically a straight port from our Settings app and
wearable-support lib. I tweaked two strings and changed
the package paths to make it easier to group the files
together.
BUG: 23080561
Change-Id: I6d72d29dd1926ad07d63f85b52ccf9f72ff70df1
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-watch/settings.xml | 21 | ||||
-rw-r--r-- | res/layout-watch/settings_internal.xml | 36 | ||||
-rw-r--r-- | res/values-watch/attrs.xml | 35 | ||||
-rw-r--r-- | res/values-watch/colors.xml | 2 | ||||
-rw-r--r-- | res/values-watch/dimens.xml | 18 | ||||
-rw-r--r-- | res/values-watch/integers.xml | 22 | ||||
-rw-r--r-- | res/values-watch/strings.xml | 5 | ||||
-rw-r--r-- | res/values-watch/styles.xml | 47 |
8 files changed, 186 insertions, 0 deletions
diff --git a/res/layout-watch/settings.xml b/res/layout-watch/settings.xml new file mode 100644 index 00000000..46249d50 --- /dev/null +++ b/res/layout-watch/settings.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <include layout="@layout/settings_internal" /> +</FrameLayout> diff --git a/res/layout-watch/settings_internal.xml b/res/layout-watch/settings_internal.xml new file mode 100644 index 00000000..afedcf47 --- /dev/null +++ b/res/layout-watch/settings_internal.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> +<merge xmlns:android="http://schemas.android.com/apk/res/android"> + <TextView + android:id="@+id/header" + android:layout_width="match_parent" + android:layout_height="@dimen/settings_header_base_height" + android:layout_marginLeft="16dp" + android:layout_marginTop="@dimen/settings_header_top_margin" + android:textSize="@dimen/setting_short_header_text_size" + android:maxLines="2" + android:ellipsize="end" + android:textColor="#9E9E9E" + android:fontFamily="sans-serif-condensed-light" + /> + + <android.support.wearable.view.WearableListView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/wheel" + android:layout_width="match_parent" + android:layout_height="match_parent" + /> +</merge> diff --git a/res/values-watch/attrs.xml b/res/values-watch/attrs.xml new file mode 100644 index 00000000..e220f4c8 --- /dev/null +++ b/res/values-watch/attrs.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<resources> + <!-- START: Ported from WearableSupport --> + <declare-styleable name="CircledImageView"> + <attr name="android:src" /> + <attr name="circle_color" format="color" /> + <attr name="circle_radius" format="dimension" /> + <attr name="circle_radius_pressed" format="dimension" /> + <attr name="circle_border_width" format="dimension" /> + <attr name="circle_border_color" format="color" /> + <attr name="circle_padding" format="dimension" /> + <attr name="shadow_width" format="dimension" /> + <attr name="image_circle_percentage" format="dimension" /> + <attr name="image_horizontal_offcenter_percentage" format="dimension" /> + <attr name="image_tint" format="color" /> + <attr name="circle_radius_percent" format="fraction" /> + <attr name="circle_radius_pressed_percent" format="fraction" /> + </declare-styleable> + <!-- END: Ported from WearableSupport --> +</resources> diff --git a/res/values-watch/colors.xml b/res/values-watch/colors.xml index 903bfef5..d05ca378 100644 --- a/res/values-watch/colors.xml +++ b/res/values-watch/colors.xml @@ -24,6 +24,8 @@ <color name="off_white">#ffeeeeee</color> + <color name="primary_text_light">#424242</color> + <!-- Copied from wearable support --> <color name="circular_button_disabled">#757575</color> </resources> diff --git a/res/values-watch/dimens.xml b/res/values-watch/dimens.xml index 29a65fdc..80f26692 100644 --- a/res/values-watch/dimens.xml +++ b/res/values-watch/dimens.xml @@ -25,4 +25,22 @@ <!-- Confirmation Dialog --> <dimen name="conf_diag_floating_height">16dp</dimen> + + <!-- START: Ported values --> + <item name="default_settings_circle_radius_percent" format="fraction" type="dimen">40%</item> + <item name="selected_settings_circle_radius_percent" format="fraction" type="dimen">50%</item> + <dimen name="round_content_padding_left">40dp</dimen> + <dimen name="round_content_padding_right">24dp</dimen> + <dimen name="content_padding_left">12dp</dimen> + <dimen name="settings_wearable_list_view_vertical_padding_round">14dp</dimen> + <dimen name="setting_header_extra_line_height">16dp</dimen> + <dimen name="setting_long_header_text_size">20dp</dimen> + <dimen name="settings_header_base_height">50dp</dimen> + <dimen name="settings_header_top_margin">14dp</dimen> + <dimen name="settings_header_top_margin_circular">18dp</dimen> + <dimen name="settings_header_top_margin_multiline">6dp</dimen> + <dimen name="settings_header_top_margin_circular_multiline">16dp</dimen> + <dimen name="setting_short_header_text_size">24dp</dimen> + <dimen name="settings_text_margin_left">10dp</dimen> + <!-- END: Ported values --> </resources> diff --git a/res/values-watch/integers.xml b/res/values-watch/integers.xml new file mode 100644 index 00000000..365ac3ab --- /dev/null +++ b/res/values-watch/integers.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- START: Ported values --> + <integer name="short_title_length">13</integer> + <integer name="char_limit_per_line">18</integer> + <!-- END: Ported values --> +</resources> diff --git a/res/values-watch/strings.xml b/res/values-watch/strings.xml index 161ff834..82841f0f 100644 --- a/res/values-watch/strings.xml +++ b/res/values-watch/strings.xml @@ -26,4 +26,9 @@ <!-- Preference row title for showing system apps. --> <string name="preference_show_system_apps">Show system apps</string> + + <!-- Generic text to indicate that a setting is enabled. Should be in all caps. [CHAR LIMIT=40] --> + <string name="generic_enabled">ENABLED</string> + <!-- Generic text to indicate that a setting is disabled. Should be in all caps. [CHAR LIMIT=40] --> + <string name="generic_disabled">DISABLED</string> </resources> diff --git a/res/values-watch/styles.xml b/res/values-watch/styles.xml new file mode 100644 index 00000000..dc2be042 --- /dev/null +++ b/res/values-watch/styles.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<resources> + <!-- START: Ported values --> + <style name="TextAppearance.Wearable.Small" parent="android:TextAppearance.Medium"> + <item name="android:textSize">16sp</item> + <item name="android:textColor">@color/primary_text_light</item> + </style> + + <style name="TextView.Small" parent="@android:style/Widget.Holo.Light"> + <item name="android:fontFamily">sans-serif-condensed</item> + <item name="android:textAppearance">@style/TextAppearance.Wearable.Small</item> + </style> + + <style name="TextView.Small.Light"> + <item name="android:fontFamily">sans-serif-condensed-light</item> + <item name="android:textAppearance">@style/TextAppearance.Wearable.Small</item> + </style> + + <style name="TextAppearance.Settings.Label" parent="android:TextAppearance.Medium"> + <item name="android:textSize">14sp</item> + <item name="android:textColor">#FFFFFFFF</item> + </style> + + <style name="TextAppearance.Settings.Label.Large"> + <item name="android:textSize">16sp</item> + </style> + + <style name="TextView.Settings.Label" parent="TextView.Small.Light"> + <item name="android:textAppearance">@style/TextAppearance.Settings.Label</item> + </style> + <!-- END: Ported values --> +</resources> |