summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-04-02 19:15:04 -0700
committerAlan Viverette <alanv@google.com>2014-04-02 19:32:15 -0700
commit45dc35b3c9e7e1494c09f4ed167426da6d376a7d (patch)
tree310084e77f2446390f5034b54a91134ff05e19cd /core/java/android/view/View.java
parent1970f570714a4746bf592e26731ea0ee8933d363 (diff)
downloadframeworks_base-45dc35b3c9e7e1494c09f4ed167426da6d376a7d.zip
frameworks_base-45dc35b3c9e7e1494c09f4ed167426da6d376a7d.tar.gz
frameworks_base-45dc35b3c9e7e1494c09f4ed167426da6d376a7d.tar.bz2
Fix dialog style, selectable item bg pinning, and pressed state
BUG: 13746931 Change-Id: I31c2959f3e773a3aeb66ba5842d8d6fbb288acc1
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5be4698..badd2c8 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4847,10 +4847,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
final float x = r.exactCenterX();
final float y = r.exactCenterY();
- mBackground.setHotspot(Drawable.HOTSPOT_FOCUS, x, y);
+ mBackground.setHotspot(R.attr.state_focused, x, y);
if (!focused) {
- mBackground.removeHotspot(Drawable.HOTSPOT_FOCUS);
+ mBackground.removeHotspot(R.attr.state_focused);
}
}
}
@@ -9092,6 +9092,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
removeTapCallback();
+ } else {
+ clearHotspot(R.attr.state_pressed);
}
break;
@@ -9204,6 +9206,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
private void removeUnsetPressCallback() {
if ((mPrivateFlags & PFLAG_PRESSED) != 0 && mUnsetPressedState != null) {
+ clearHotspot(R.attr.state_pressed);
setPressed(false);
removeCallbacks(mUnsetPressedState);
}