From f7d1dc2b5ef3c0ff3b655528a0324c3fc3ab03f3 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 6 Aug 2014 11:37:38 +0900 Subject: [PATCH] Use add icon for add custom input style menu Bug: 16805043 Change-Id: I9730a6aa5d761924457edaabcee25db930e20f02 --- .../drawable-hdpi/ic_add_circle_wht_24dp.png | Bin 0 -> 436 bytes .../drawable-mdpi/ic_add_circle_wht_24dp.png | Bin 0 -> 305 bytes .../drawable-xhdpi/ic_add_circle_wht_24dp.png | Bin 0 -> 466 bytes .../ic_add_circle_wht_24dp.png | Bin 0 -> 684 bytes java/res/menu/add_style.xml | 26 ++++++++++++++++++ .../CustomInputStyleSettingsFragment.java | 6 ++-- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 java/res/drawable-hdpi/ic_add_circle_wht_24dp.png create mode 100644 java/res/drawable-mdpi/ic_add_circle_wht_24dp.png create mode 100644 java/res/drawable-xhdpi/ic_add_circle_wht_24dp.png create mode 100644 java/res/drawable-xxhdpi/ic_add_circle_wht_24dp.png create mode 100644 java/res/menu/add_style.xml diff --git a/java/res/drawable-hdpi/ic_add_circle_wht_24dp.png b/java/res/drawable-hdpi/ic_add_circle_wht_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..314c52137f24c92b0f367f9fede3cd6919267734 GIT binary patch literal 436 zcmV;l0ZaagP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00002 zVoOIv0RM-N%)bBt0WnELK~zY`-PX@f!Y~xT@dt#se+eXOw=pn0K2JKo`!VST;4qbUe7dmw74UKi^$xx}! zY#|7(g%-Vni4MIQMqx{RbT5Ad=~Gjje`NX-$!=(`y)I1MBBtD5@yVN eFA*DY(fR;@{dTx(P{pDE0000NS%G|oWRD45bDP46hOx7_4S6Fo+k-*%fF5lweBoc6VX;-`;;_KajW1 z)5S5w;`G)l8@Ub{2sAv@&Z@N(6xs5A(PF+|VzFNuyI9xW*txp&#kBjLL6aw`g}mQZ z5btp)mW9(>l53gDl9Z5;lqD)h^foLx(!<`JC$Mq3wTQKnv`pdAgDk~Ugf-G~1&YnN zSPa9s)TGv|mCa?)<~;#9jAVgnwJmKWhZ}c;$F004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00002 zVoOIv0RM-N%)bBt0Z&OpK~z}7?btt00x=lJ@g7{*hz`U72j7Dc6W@h@-U)*mSCJ7l z?yMRi4*E*a$-#w4G!b2l0Ui9hXdr2!z3X$ufnV24Ke;x&KF=vswnNPU2_Q#>Di?Hk z`yCz5sj^1SA1G6&%cOLvQ%(;oa?Ai*1~gbm18nn*Yo6Fl2IM&-X->(z0tMQnNsEFD z5OYJ?Toc=Y6MWLJ0Xz8Ro2_X;iC28nr!*O`EzjR`36^Pm`W3!JfFa9f;K=&=ZUEFw zKKvNqF$hNWbUkTX*KY{#6jw`cx+5i9m07*qo IM6N<$f^?>~6951J literal 0 HcmV?d00001 diff --git a/java/res/drawable-xxhdpi/ic_add_circle_wht_24dp.png b/java/res/drawable-xxhdpi/ic_add_circle_wht_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..a22c463f958f04a3e26afa824b4ead304e2b6f26 GIT binary patch literal 684 zcmV;d0#p5oP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00002 zVoOIv0RM-N%)bBt0x3yEK~!ko?b=OC8$le$@dd34Mx@q=omiiuIZ(>``&4*}`uLlt-X4aYAotaJ8-<*?tGTEK% z{Qu+NgljkvC;~;Ghfz*DgUoP9k`q#-I3dXa(+u*Sa+9D}^pW5aw_LExM{4wgT3IKJ zY|^aJq7U?zJ-j4AYw(~3;`m9N`XE8w{K0Qd=?Vr^!Z=xiNR}~5{DP`T5M*|#@&l^o zfS|KawO3G#BXr~!F)yG}Hqn(0@wFrdO`-U?_=4EkXO^j!@4E&ai& z!!1cM=-dkEpBR+30=h0B(3us`-vYX*LwDQHSpm(8LBm!+Lk0BbTEUfZ(Bo_bNw1TPR!)Wv)uQK^R?uh>l!YD2*wMoI%8MdtE!@x2QlOkg%8IN# z6~YGI{itNZ$I6sp;&EB32%Es6Y?FubAVI#P7RRIjNO5fEs6})-CIUqum2n3_=;Dy^ Sfgz{>0000 + + + + \ No newline at end of file diff --git a/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java index 21f2afd01..6d7f53cf0 100644 --- a/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/CustomInputStyleSettingsFragment.java @@ -63,7 +63,6 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment { private AlertDialog mSubtypeEnablerNotificationDialog; private String mSubtypePreferenceKeyForSubtypeEnabler; - private static final int MENU_ADD_SUBTYPE = Menu.FIRST; private static final String KEY_IS_ADDING_NEW_SUBTYPE = "is_adding_new_subtype"; private static final String KEY_IS_SUBTYPE_ENABLER_NOTIFICATION_DIALOG_OPEN = "is_subtype_enabler_notification_dialog_open"; @@ -581,14 +580,13 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment { @Override public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { - final MenuItem addSubtypeMenu = menu.add(0, MENU_ADD_SUBTYPE, 0, R.string.add_style); - addSubtypeMenu.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); + inflater.inflate(R.menu.add_style, menu); } @Override public boolean onOptionsItemSelected(final MenuItem item) { final int itemId = item.getItemId(); - if (itemId == MENU_ADD_SUBTYPE) { + if (itemId == R.id.action_add_style) { final SubtypePreference newSubtype = SubtypePreference.newIncompleteSubtypePreference(getActivity(), mSubtypeProxy); getPreferenceScreen().addPreference(newSubtype);