diff options
author | Bjorn Bringert <bringert@android.com> | 2010-03-03 21:29:04 +0000 |
---|---|---|
committer | Bjorn Bringert <bringert@android.com> | 2010-03-03 21:50:29 +0000 |
commit | 22b23a1bea61df3988daf2c5b7d6fe2f60b80aab (patch) | |
tree | f03c503d0ee2cd750adb2d1df2288e693f6eeb5b | |
parent | 687c44f2f02cecc4103c611ead225f990402d1af (diff) | |
download | frameworks_base-22b23a1bea61df3988daf2c5b7d6fe2f60b80aab.zip frameworks_base-22b23a1bea61df3988daf2c5b7d6fe2f60b80aab.tar.gz frameworks_base-22b23a1bea61df3988daf2c5b7d6fe2f60b80aab.tar.bz2 |
Use "play" icon for search dialog button in Browser
Fixes http://b/issue?id=2485462
Change-Id: Ibc8843b236aa0a063d91fbd37a2c09cebd21163e
-rw-r--r-- | core/java/android/app/SearchDialog.java | 18 | ||||
-rw-r--r-- | core/res/res/drawable-hdpi/ic_btn_search_play.png | bin | 0 -> 960 bytes | |||
-rw-r--r-- | core/res/res/drawable-mdpi/ic_btn_search_play.png | bin | 0 -> 677 bytes |
3 files changed, 6 insertions, 12 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index af68689..c2afd07 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -464,15 +464,14 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS } } - /** - * Update the text in the search button. Note: This is deprecated functionality, for - * 1.0 compatibility only. - */ - private void updateSearchButton() { + private void updateSearchButton() { String textLabel = null; Drawable iconLabel = null; int textId = mSearchable.getSearchButtonText(); - if (textId != 0) { + if (isBrowserSearch()){ + iconLabel = getContext().getResources() + .getDrawable(com.android.internal.R.drawable.ic_btn_search_play); + } else if (textId != 0) { textLabel = mActivityContext.getResources().getString(textId); } else { iconLabel = getContext().getResources(). @@ -483,10 +482,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS } private void updateSearchAppIcon() { - // In Donut, we special-case the case of the browser to hide the app icon as if it were - // global search, for extra space for url entry. - // - // TODO: Remove this special case once the issue has been reconciled in Eclair. if (isBrowserSearch()) { mAppIcon.setImageResource(0); mAppIcon.setVisibility(View.GONE); @@ -583,8 +578,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS } /** - * Hack to determine whether this is the browser, so we can remove the browser icon - * to the left of the search field. + * Hack to determine whether this is the browser, so we can adjust the UI. */ private boolean isBrowserSearch() { return mLaunchComponent.flattenToShortString().startsWith("com.android.browser/"); diff --git a/core/res/res/drawable-hdpi/ic_btn_search_play.png b/core/res/res/drawable-hdpi/ic_btn_search_play.png Binary files differnew file mode 100644 index 0000000..fb1b974 --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_btn_search_play.png diff --git a/core/res/res/drawable-mdpi/ic_btn_search_play.png b/core/res/res/drawable-mdpi/ic_btn_search_play.png Binary files differnew file mode 100644 index 0000000..dc25dae --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_btn_search_play.png |