OSDN Git Service

[WifiSetup] Swap buttons position in Skip dialog
authorMaurice Lam <yukl@google.com>
Mon, 1 Dec 2014 20:09:10 +0000 (12:09 -0800)
committerMaurice Lam <yukl@google.com>
Mon, 1 Dec 2014 20:09:10 +0000 (12:09 -0800)
According to material-spec, buttons that keep users in the same
screen should be on the left (negative button) while button that
intorduce changes should be on the right, even if the action is
destructive.

Bug: 18542108
Change-Id: I335f83c6bb810cd43aeda28566baacea39435c57

src/com/android/settings/wifi/WifiSetupActivity.java

index 1d0e824..a036bae 100644 (file)
@@ -239,7 +239,7 @@ public class WifiSetupActivity extends WifiPickerActivity
             return new AlertDialog.Builder(getActivity())
                     .setMessage(messageRes)
                     .setCancelable(false)
-                    .setNegativeButton(R.string.wifi_skip_anyway,
+                    .setPositiveButton(R.string.wifi_skip_anyway,
                             new DialogInterface.OnClickListener() {
                         @Override
                         public void onClick(DialogInterface dialog, int id) {
@@ -247,7 +247,7 @@ public class WifiSetupActivity extends WifiPickerActivity
                             activity.finishOrNext(RESULT_SKIP);
                         }
                     })
-                    .setPositiveButton(R.string.wifi_dont_skip,
+                    .setNegativeButton(R.string.wifi_dont_skip,
                             new DialogInterface.OnClickListener() {
                         @Override
                         public void onClick(DialogInterface dialog, int id) {