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 <manuelrciosici@gmail.com>
This commit is contained in:
Manuel R. Ciosici
2012-09-21 16:57:55 +02:00
parent 76ddf4113a
commit ec8f68a527

View File

@@ -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);