diff options
author | ianwen@chromium.org <ianwen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-01 21:12:00 +0000 |
---|---|---|
committer | ianwen@chromium.org <ianwen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-01 21:12:00 +0000 |
commit | 1d6740f643389e4528079adfc865a8139ec84b9d (patch) | |
tree | 59e8e51d36e94bbd9b5aa94927e69acf1833d38e | |
parent | be27341b8b337d6e5b3f5bfc115f408a9655b048 (diff) | |
download | chromium_src-1d6740f643389e4528079adfc865a8139ec84b9d.zip chromium_src-1d6740f643389e4528079adfc865a8139ec84b9d.tar.gz chromium_src-1d6740f643389e4528079adfc865a8139ec84b9d.tar.bz2 |
Update setupImageButton() in AppMenuAdapter to restore drawable's level after button.setImageDrawable() is called.
BUG=386526
NOTRY=true
Review URL: https://codereview.chromium.org/343183006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280882 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuAdapter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuAdapter.java index 93c5ca5..37f6f97 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuAdapter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuAdapter.java @@ -209,7 +209,11 @@ class AppMenuAdapter extends BaseAdapter { } private void setupImageButton(ImageButton button, final MenuItem item) { + // Store and recover the level of image as button.setimageDrawable + // resets drawable to default level. + int currentLevel = item.getIcon().getLevel(); button.setImageDrawable(item.getIcon()); + item.getIcon().setLevel(currentLevel); button.setContentDescription(item.getTitle()); button.setEnabled(item.isEnabled()); button.setFocusable(item.isEnabled()); |