From: Manuel R. Ciosici Date: Fri, 21 Sep 2012 14:57:55 +0000 (+0200) Subject: Makes the add button for new APNs appear in the action bar. X-Git-Tag: android-x86-4.4-r1~634^2~1^2~8^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ec8f68a527ecd10e42fcd77e05254c050fed7919;p=android-x86%2Fpackages-apps-Settings.git Makes the add button for new APNs appear in the action bar. The APN add button (a plus sign) now appears in the action bar if possible. The APN list interface is now more consistent with the WiFi list interface. Previously the user had to press the 'Menu' hardware button or the three dot button on the screen in order to reveal the actions. Change-Id: Iae622054ec080ba4775c22223dd75a865c83fc27 Signed-off-by: Manuel R. Ciosici --- diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java index 56ee7a96f6..de1ce635da 100644 --- a/src/com/android/settings/ApnSettings.java +++ b/src/com/android/settings/ApnSettings.java @@ -209,7 +209,8 @@ public class ApnSettings extends PreferenceActivity implements super.onCreateOptionsMenu(menu); menu.add(0, MENU_NEW, 0, getResources().getString(R.string.menu_new)) - .setIcon(android.R.drawable.ic_menu_add); + .setIcon(android.R.drawable.ic_menu_add) + .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); menu.add(0, MENU_RESTORE, 0, getResources().getString(R.string.menu_restore)) .setIcon(android.R.drawable.ic_menu_upload);