From 47a3db7767849430eda4e8429fa86b0d985bd938 Mon Sep 17 00:00:00 2001 From: Henrik Tunedal Date: Thu, 3 Feb 2011 01:26:49 +0100 Subject: [PATCH] Changed button order in app details dialog. Most Android applications have the cancel button on the right, but this dialog had it on the left (Cancel/Install). It was especially confusing as pressing "Install" immediately leads to a system dialog with Install/Cancel buttons (i.e. in the opposite order). --- src/org/fdroid/fdroid/AppDetails.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/org/fdroid/fdroid/AppDetails.java b/src/org/fdroid/fdroid/AppDetails.java index 6e59a5c7d..ed89ee8f2 100644 --- a/src/org/fdroid/fdroid/AppDetails.java +++ b/src/org/fdroid/fdroid/AppDetails.java @@ -307,15 +307,8 @@ public class AppDetails extends ListActivity { } p.setMessage(getString(R.string.isinst) + " " + installed); - p.setButton(getString(R.string.cancel), - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - return; - } - }); - if (caninstall) { - p.setButton2(getString(R.string.install), + p.setButton(getString(R.string.install), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { p.dismiss(); @@ -323,7 +316,7 @@ public class AppDetails extends ListActivity { } }); } else { - p.setButton2(getString(R.string.uninstall), + p.setButton(getString(R.string.uninstall), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { p.dismiss(); @@ -332,6 +325,13 @@ public class AppDetails extends ListActivity { }); } + p.setButton2(getString(R.string.cancel), + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + return; + } + }); + p.show(); }