summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-06-12 19:41:17 (GMT)
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-12 19:41:17 (GMT)
commitfab8e5506ddb26cb8218aa89b60813a8083b9998 (patch)
tree891c9fa58478933ef162438be3e9077f1e83458d
parent307f0b4d4d6a49e87342a66bb9bb0adb4a36352a (diff)
parentdb2bfa05062b492664eff85c87dc6b725a9c983c (diff)
downloadandroid_packages_apps_Trebuchet-fab8e5506ddb26cb8218aa89b60813a8083b9998.zip
android_packages_apps_Trebuchet-fab8e5506ddb26cb8218aa89b60813a8083b9998.tar.gz
android_packages_apps_Trebuchet-fab8e5506ddb26cb8218aa89b60813a8083b9998.tar.bz2
am db2bfa05: Merge "Fixing issue where play icon disappears after hitting home (Bug 6636269)" into jb-dev
* commit 'db2bfa05062b492664eff85c87dc6b725a9c983c': Fixing issue where play icon disappears after hitting home (Bug 6636269)
-rw-r--r--src/com/android/launcher2/Launcher.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 28dfd65..0c0fdad 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2923,9 +2923,9 @@ public final class Launcher extends Activity
}
- private void updateTextButtonWithDrawable(int buttonId, Drawable.ConstantState d) {
+ private void updateTextButtonWithDrawable(int buttonId, Drawable d) {
TextView button = (TextView) findViewById(buttonId);
- button.setCompoundDrawables(d.newDrawable(getResources()), null, null, null);
+ button.setCompoundDrawables(d, null, null, null);
}
private void updateButtonWithDrawable(int buttonId, Drawable.ConstantState d) {
@@ -3077,7 +3077,14 @@ public final class Launcher extends Activity
}
private void updateAppMarketIcon(Drawable.ConstantState d) {
- updateTextButtonWithDrawable(R.id.market_button, d);
+ // Ensure that the new drawable we are creating has the approprate toolbar icon bounds
+ Resources r = getResources();
+ Drawable marketIconDrawable = d.newDrawable(r);
+ int w = r.getDimensionPixelSize(R.dimen.toolbar_external_icon_width);
+ int h = r.getDimensionPixelSize(R.dimen.toolbar_external_icon_height);
+ marketIconDrawable.setBounds(0, 0, w, h);
+
+ updateTextButtonWithDrawable(R.id.market_button, marketIconDrawable);
}
@Override