From 22b23a1bea61df3988daf2c5b7d6fe2f60b80aab Mon Sep 17 00:00:00 2001 From: Bjorn Bringert Date: Wed, 3 Mar 2010 21:29:04 +0000 Subject: [PATCH] Use "play" icon for search dialog button in Browser Fixes http://b/issue?id=2485462 Change-Id: Ibc8843b236aa0a063d91fbd37a2c09cebd21163e --- core/java/android/app/SearchDialog.java | 18 ++++++------------ .../res/drawable-hdpi/ic_btn_search_play.png | Bin 0 -> 960 bytes .../res/drawable-mdpi/ic_btn_search_play.png | Bin 0 -> 677 bytes 3 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 core/res/res/drawable-hdpi/ic_btn_search_play.png create mode 100644 core/res/res/drawable-mdpi/ic_btn_search_play.png diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index af68689807d0e..c2afd070a209e 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 new file mode 100644 index 0000000000000000000000000000000000000000..fb1b974b04ff64e546b87d62c2b759996c8babdf GIT binary patch literal 960 zcmV;x13&zUP)-v}B;o;Alo10Uor>BvdBht8Vs~3;Qp{J(@hK7blXJ%%OQmNFEs;Wkm@Aj=2 zW9;eWwbUzw5MYcU7K?$Zs-S6FdSGB6QgirLj1U5Z5TKMky;DkGw7F|&OXJ=>2#bWWzUktp>pGaGnP_w_H<&kLQQ*9Lj^i|(aa?oE z%~}1J2(v~h1;=qJS65g0+1c5t$QASEBucd$$FX;Jca!Vu>wn%lH&DjHfVg{vkjmxd zWipq`efK*vFj$ysF~*=)t1YdruI3L9534*-TwwL%B1p9eA;;(E=b6RD#h<)D++e&` zdiN-$m7ANJrEE4^2nxgv=5`g2m5<$P+qRwD+S+ycD+Z;bDDW#R`>+4KDpD#uM z;s$ePnAb`#5MvDP@9)2EY;0ssPENSP9T}{Vm5=vdzb`H>k}E4Kfx{gc?C$Q)rj#Zq zrO%*hwOYPVD1;8TpM3v`8-@{|o13#S#-j)!czAfQ4-O8JJ3Bj(!tE;bBZBwRhke@9 i0t>1ZSWvaVg6c2iyY#{-AT8_w0000KmOrc7P#DJFbBrhf)8dhc5dRDTK^)w45~Z<-W@s67u}=ocH16 zAj2@=ISM}ux2_exOf;g!Tau)Qcs!nCSr&G? z9jL0h9*stCCzHwe77*1D&+|E-&j%il2UwPcU@#a927?dTYHnUH=XDhwL=krg1r!bex1>tZQ2q8H^5WXxHi;ta7r)jmEjvZOS%#@1Oo3wQM{i{ zr&6!iYdHozbz}$Absad4gJd%KIur_hAcVXE0Lj#&?hK}*^ZEQsx4LI`!!Upl0+~!E z_s5Pd=R|S1-)uJTFZFC4{qE~2u0O3-t605WUpRI|i#KIvV~p{eLZR^0O7G@)U-U7? zxLGQd9%))vIkJGQbzN_k%jM5@fSVkdgT@%QDwT>vd)KO{VK|*mbBjSY6-9|vtJSL@ z05+RyB9Vv|i^Vy^Fnfg17-QUQG#ZwJrj?@~-`}qP?{M-0y1Bjq+8UwK(y7!_00000 LNkvXXu0mjf8U!TW literal 0 HcmV?d00001