OSDN Git Service

Makes the add button for new APNs appear in the action bar.
authorManuel R. Ciosici <manuelrciosici@gmail.com>
Fri, 21 Sep 2012 14:57:55 +0000 (16:57 +0200)
committerManuel R. Ciosici <manuelrciosici@gmail.com>
Fri, 21 Sep 2012 14:57:55 +0000 (16:57 +0200)
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>
src/com/android/settings/ApnSettings.java

index 56ee7a9..de1ce63 100644 (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);