summaryrefslogtreecommitdiffstats
path: root/core/res
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2012-04-19 17:58:03 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-20 09:40:11 -0700
commitd84e5937468f6ebf2313ccd5ae54d5405f5e9cde (patch)
treedca721125f7a9b1d5147c32a651173ba1dc38721 /core/res
parente17fc7d6693ed36058a880c69332f642ad48cf18 (diff)
downloadframeworks_base-d84e5937468f6ebf2313ccd5ae54d5405f5e9cde.zip
frameworks_base-d84e5937468f6ebf2313ccd5ae54d5405f5e9cde.tar.gz
frameworks_base-d84e5937468f6ebf2313ccd5ae54d5405f5e9cde.tar.bz2
fix press feedback on notification rows
Change-Id: I50de2f4d6142c2553428abc853c820f4354d0640 Bug: 6362246
Diffstat (limited to 'core/res')
-rw-r--r--core/res/res/drawable/notification_bg.xml22
-rw-r--r--core/res/res/layout/notification_template_base.xml2
-rw-r--r--core/res/res/layout/notification_template_big_picture.xml2
-rw-r--r--core/res/res/layout/notification_template_big_text.xml2
-rw-r--r--core/res/res/values/colors.xml2
-rw-r--r--core/res/res/values/public.xml1
6 files changed, 28 insertions, 3 deletions
diff --git a/core/res/res/drawable/notification_bg.xml b/core/res/res/drawable/notification_bg.xml
new file mode 100644
index 0000000..1bb2172
--- /dev/null
+++ b/core/res/res/drawable/notification_bg.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+
+ <item android:state_pressed="true" android:drawable="@drawable/notification_item_background_color_pressed" />
+ <item android:state_pressed="false" android:drawable="@drawable/notification_item_background_color" />
+</selector>
diff --git a/core/res/res/layout/notification_template_base.xml b/core/res/res/layout/notification_template_base.xml
index bd26232..af05aed 100644
--- a/core/res/res/layout/notification_template_base.xml
+++ b/core/res/res/layout/notification_template_base.xml
@@ -16,7 +16,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:internal="http://schemas.android.com/apk/prv/res/android"
- android:background="@android:color/background_dark"
+ android:background="@android:drawable/notification_bg"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="64dp"
diff --git a/core/res/res/layout/notification_template_big_picture.xml b/core/res/res/layout/notification_template_big_picture.xml
index 2150096..51e46b2 100644
--- a/core/res/res/layout/notification_template_big_picture.xml
+++ b/core/res/res/layout/notification_template_big_picture.xml
@@ -16,7 +16,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:internal="http://schemas.android.com/apk/prv/res/android"
- android:background="@android:color/background_dark"
+ android:background="@android:drawable/notification_bg"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/core/res/res/layout/notification_template_big_text.xml b/core/res/res/layout/notification_template_big_text.xml
index 3a0bfc7..b6d71e1 100644
--- a/core/res/res/layout/notification_template_big_text.xml
+++ b/core/res/res/layout/notification_template_big_text.xml
@@ -15,7 +15,7 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:internal="http://schemas.android.com/apk/prv/res/android"
- android:background="@android:color/background_dark"
+ android:background="@android:drawable/notification_bg"
android:id="@+id/status_bar_latest_event_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 5ff2c01..e23e3c6 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -22,6 +22,8 @@
<drawable name="screen_background_dark">#ff000000</drawable>
<drawable name="status_bar_closed_default_background">#ff000000</drawable>
<drawable name="status_bar_opened_default_background">#ff000000</drawable>
+ <drawable name="notification_item_background_color">#ff111111</drawable>
+ <drawable name="notification_item_background_color_pressed">#ff257390</drawable>
<drawable name="search_bar_default_color">#ff000000</drawable>
<drawable name="safe_mode_background">#60000000</drawable>
<!-- Background drawable that can be used for a transparent activity to
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 3f8036b..57a4b29 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1002,6 +1002,7 @@
<java-symbol type="drawable" name="ic_lockscreen_silent" />
<java-symbol type="drawable" name="ic_lockscreen_unlock" />
<java-symbol type="drawable" name="ic_lockscreen_search" />
+ <java-symbol type="drawable" name="notification_bg" />
<java-symbol type="layout" name="action_bar_home" />
<java-symbol type="layout" name="action_bar_title_item" />