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 000000000..314c52137 Binary files /dev/null and b/java/res/drawable-hdpi/ic_add_circle_wht_24dp.png differ diff --git a/java/res/drawable-mdpi/ic_add_circle_wht_24dp.png b/java/res/drawable-mdpi/ic_add_circle_wht_24dp.png new file mode 100644 index 000000000..11363b173 Binary files /dev/null and b/java/res/drawable-mdpi/ic_add_circle_wht_24dp.png differ diff --git a/java/res/drawable-xhdpi/ic_add_circle_wht_24dp.png b/java/res/drawable-xhdpi/ic_add_circle_wht_24dp.png new file mode 100644 index 000000000..32a5b05ba Binary files /dev/null and b/java/res/drawable-xhdpi/ic_add_circle_wht_24dp.png differ 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 000000000..a22c463f9 Binary files /dev/null and b/java/res/drawable-xxhdpi/ic_add_circle_wht_24dp.png differ diff --git a/java/res/menu/add_style.xml b/java/res/menu/add_style.xml new file mode 100644 index 000000000..d1cab4bb5 --- /dev/null +++ b/java/res/menu/add_style.xml @@ -0,0 +1,26 @@ + + +
\ 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);