|
@ -520,15 +520,17 @@ public class FragmentAccount extends FragmentEx { |
|
|
|
|
|
|
|
|
ibDelete.setOnClickListener(new View.OnClickListener() { |
|
|
ibDelete.setOnClickListener(new View.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(View view) { |
|
|
|
|
|
|
|
|
public void onClick(View v) { |
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); |
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); |
|
|
builder |
|
|
builder |
|
|
.setMessage(R.string.title_account_delete) |
|
|
.setMessage(R.string.title_account_delete) |
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { |
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
public void onClick(DialogInterface dialog, int which) { |
|
|
// TODO: spinner |
|
|
|
|
|
getFragmentManager().popBackStack(); |
|
|
|
|
|
|
|
|
Helper.setViewsEnabled(view, false); |
|
|
|
|
|
btnCheck.setEnabled(false); |
|
|
|
|
|
btnSave.setEnabled(false); |
|
|
|
|
|
pbWait.setVisibility(View.VISIBLE); |
|
|
|
|
|
|
|
|
Bundle args = new Bundle(); |
|
|
Bundle args = new Bundle(); |
|
|
args.putLong("id", id); |
|
|
args.putLong("id", id); |
|
@ -544,9 +546,15 @@ public class FragmentAccount extends FragmentEx { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
protected void onLoaded(Bundle args, Void data) { |
|
|
|
|
|
getFragmentManager().popBackStack(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
protected void onException(Bundle args, Throwable ex) { |
|
|
protected void onException(Bundle args, Throwable ex) { |
|
|
Toast.makeText(getContext(), ex.toString(), Toast.LENGTH_LONG).show(); |
|
|
Toast.makeText(getContext(), ex.toString(), Toast.LENGTH_LONG).show(); |
|
|
|
|
|
// TODO: recover from error |
|
|
} |
|
|
} |
|
|
}.load(FragmentAccount.this, args); |
|
|
}.load(FragmentAccount.this, args); |
|
|
} |
|
|
} |
|
|