summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorKeyvan Amiri <keyvana@google.com>2016-04-13 22:49:55 -0700
committerKeyvan Amiri <keyvana@google.com>2016-04-14 11:25:13 -0700
commitb22473b280b2b893167ffaae24e9b1c43d343a3f (patch)
tree909c57d46c739e13221714eec4b895721fc15eae /res
parent68aee0afc31a0971e817e882d9e71abcc5833e81 (diff)
downloadandroid_packages_apps_PackageInstaller-b22473b280b2b893167ffaae24e9b1c43d343a3f.tar.gz
android_packages_apps_PackageInstaller-b22473b280b2b893167ffaae24e9b1c43d343a3f.tar.bz2
android_packages_apps_PackageInstaller-b22473b280b2b893167ffaae24e9b1c43d343a3f.zip
Reworked permission UI on TV into the new side-panel leanback style
Reworked all the permission UIs on TV to mesh with the rest of the settings rendered as leanback-styled side panels with title bars. The permissions consist of the following components: * Each individual app permission listing ** Listing of all the permissions together with the apps using those permissions Bug: 27344882 Bug: 22481180 Change-Id: I4ab05efd9a4ea6fab7971b89f13d65591a2be8ee
Diffstat (limited to 'res')
-rw-r--r--res/layout-television/header.xml47
-rw-r--r--res/layout-television/permissions_frame.xml98
-rw-r--r--res/values-television/colors.xml2
-rw-r--r--res/values-television/strings.xml7
-rw-r--r--res/values-television/themes.xml6
5 files changed, 77 insertions, 83 deletions
diff --git a/res/layout-television/header.xml b/res/layout-television/header.xml
new file mode 100644
index 00000000..56e35db7
--- /dev/null
+++ b/res/layout-television/header.xml
@@ -0,0 +1,47 @@
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/defaultBrandColor"
+ android:elevation="@dimen/lb_preference_decor_title_container_elevation"
+ android:orientation="vertical">
+
+ <FrameLayout
+ android:id="@+id/decor_title_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/defaultBrandColor"
+ android:elevation="@dimen/lb_preference_decor_title_container_elevation"
+ android:transitionGroup="false"
+ >
+ <TextView
+ android:id="@+id/decor_title"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/lb_preference_decor_title_text_height"
+ android:layout_marginTop="@dimen/lb_preference_decor_title_margin_top"
+ android:layout_marginStart="@dimen/lb_preference_decor_title_margin_start"
+ android:layout_marginEnd="@dimen/lb_preference_decor_title_margin_end"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center_vertical"
+ android:singleLine="true"
+ android:textSize="@dimen/lb_preference_decor_title_text_size"
+ android:textColor="?android:attr/textColorPrimary"
+ />
+ </FrameLayout>
+
+</LinearLayout>
diff --git a/res/layout-television/permissions_frame.xml b/res/layout-television/permissions_frame.xml
index da0b2555..1dcda8d4 100644
--- a/res/layout-television/permissions_frame.xml
+++ b/res/layout-television/permissions_frame.xml
@@ -15,99 +15,33 @@
~ limitations under the License
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:filterTouchesWhenObscured="true">
<FrameLayout
- android:layout_width="@dimen/lb_action_section_width"
- android:layout_height="match_parent"
- android:layout_alignParentEnd="true"
- android:background="@color/lb_action_fragment_background">
+ android:layout_width="@dimen/lb_settings_pane_width"
+ android:layout_height="match_parent"
+ android:background="@color/lb_preference_decor_list_background"
+ android:layout_gravity="end">
<FrameLayout
- android:id="@+id/prefs_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:id="@+id/prefs_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TextView
- android:id="@+id/no_permissions"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="@string/no_permissions"
- android:gravity="center"
- android:textAppearance="@android:style/TextAppearance.Large"
- />
+ android:id="@+id/no_permissions"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/no_permissions"
+ android:gravity="center"
+ android:textAppearance="@android:style/TextAppearance.Large"
+ />
</FrameLayout>
</FrameLayout>
-
- <RelativeLayout
- android:layout_width="@dimen/lb_content_section_width"
- android:layout_height="match_parent"
- android:layout_alignParentStart="true"
- android:background="@color/lb_dialog_activity_background"
- android:paddingStart="@dimen/lb_content_fragment_start_padding"
- android:paddingEnd="@dimen/lb_content_fragment_delimiter_padding" >
-
- <ImageView
- android:id="@+id/lb_icon"
- android:layout_width="@dimen/lb_content_fragment_icon_width"
- android:layout_height="@dimen/lb_content_fragment_icon_width"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
- android:layout_marginStart="@dimen/lb_content_fragment_delimiter_padding"
- android:maxHeight="@dimen/lb_content_fragment_max_icon_height"
- android:minHeight="@dimen/lb_content_fragment_icon_width"
- android:scaleType="fitCenter"
- tools:ignore="ContentDescription" />
-
- <TextView
- android:id="@+id/lb_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignWithParentIfMissing="true"
- android:layout_centerVertical="true"
- android:layout_toStartOf="@id/lb_icon"
- android:ellipsize="end"
- android:fontFamily="sans-serif-light"
- android:gravity="end"
- android:maxLines="2"
- android:paddingBottom="@dimen/lb_content_fragment_title_text_bottom_padding"
- android:paddingTop="@dimen/lb_content_fragment_title_text_top_padding"
- android:textColor="@color/lb_content_title_text_color"
- android:textSize="@dimen/lb_content_fragment_title_text_size"/>
-
- <TextView
- android:id="@+id/lb_breadcrumb"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_above="@id/lb_title"
- android:layout_alignWithParentIfMissing="true"
- android:layout_toStartOf="@id/lb_icon"
- android:ellipsize="end"
- android:fontFamily="sans-serif-condensed"
- android:singleLine="true"
- android:textColor="@color/lb_content_breadcrumb_text_color"
- android:textSize="@dimen/lb_content_fragment_breadcrumb_text_size" />
-
- <TextView
- android:id="@+id/lb_description"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignWithParentIfMissing="true"
- android:layout_below="@id/lb_title"
- android:layout_toStartOf="@id/lb_icon"
- android:ellipsize="end"
- android:fontFamily="sans-serif"
- android:gravity="end"
- android:maxLines="6"
- android:textColor="@color/lb_content_description_text_color"
- android:textSize="@dimen/lb_content_fragment_description_text_size"
- android:lineSpacingExtra="3dp"/>
- </RelativeLayout>
-
-</RelativeLayout>
+</FrameLayout>
diff --git a/res/values-television/colors.xml b/res/values-television/colors.xml
index 08209600..6afe2483 100644
--- a/res/values-television/colors.xml
+++ b/res/values-television/colors.xml
@@ -22,6 +22,8 @@
<color name="lb_action_fragment_background">#FF111111</color>
<color name="lb_dialog_activity_background">#77000000</color>
+ <color name="lb_header_banner_color">#1f292d</color>
+
<color name="grant_permissions_background_color">#ff263238</color>
<color name="grant_permissions_app_color">@color/grant_permissions_white_text_alpha_100</color>
<color name="grant_permissions_progress_color">@color/grant_permissions_white_text_alpha_100</color>
diff --git a/res/values-television/strings.xml b/res/values-television/strings.xml
index f1d17469..c11d865c 100644
--- a/res/values-television/strings.xml
+++ b/res/values-television/strings.xml
@@ -28,4 +28,11 @@
<!-- Preference row title for showing system apps. -->
<string name="preference_show_system_apps">Show system apps</string>
+
+ <!--decor title displayed as the page title for different TV permission screens-->
+ <string name="app_permissions_decor_title">App permissions</string>
+ <string name="manage_permissions_decor_title">App permissions</string>
+ <string name="permission_apps_decor_title"><xliff:g id="permission" example="Camera">%1$s</xliff:g> permissions</string>
+ <string name="additional_permissions_decor_title">Additional permissions</string>
+ <string name="system_apps_decor_title"><xliff:g id="permission" example="Camera">%1$s</xliff:g> permissions</string>
</resources>
diff --git a/res/values-television/themes.xml b/res/values-television/themes.xml
index f6946f68..f778fad2 100644
--- a/res/values-television/themes.xml
+++ b/res/values-television/themes.xml
@@ -17,7 +17,11 @@
<resources>
<style name="Settings" parent="Theme.Leanback">
- <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Permissions</item>
+ <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Leanback</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:backgroundDimEnabled">true</item>
+ <item name="android:backgroundDimAmount">0.8</item>
</style>
<style name="GrantPermissions" parent="Theme.Leanback">