diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java index e5b9b7515..a36fa13d0 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java @@ -727,10 +727,21 @@ public class PojavLoginActivity extends BaseActivity final String selectedAccName = accountName.getText().toString(); @Override public void onClick(View v) { - new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName); - accountListLayout.removeViewsInLayout(0,1); - //Resize the window - accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), 200 + accountListLayout.getChildCount()*150)); + AlertDialog.Builder builder2 = new AlertDialog.Builder(PojavLoginActivity.this); + builder2.setTitle(selectedAccName); + builder2.setMessage(R.string.warning_remove_account); + builder2.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener(){ + + @Override + public void onClick(DialogInterface p1, int p2) { + new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName); + accountListLayout.removeViewsInLayout(0,1); + //Resize the window + accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), 200 + accountListLayout.getChildCount()*150)); + } + }); + builder2.setNegativeButton(android.R.string.cancel, null); + builder2.show(); } });