use of run.wallet.iota.ui.dialog.ForgotPasswordDialog in project run-wallet-android by runplay.
the class UiManager method checkPin.
public static void checkPin(final Activity activity) {
if (!Store.isLoggedIn()) {
if (dialog != null) {
dialog.dismiss();
dialog = null;
}
AlertDialog.Builder builder = new AlertDialog.Builder(activity, R.style.PinDialog);
final View dialogView = View.inflate(activity, R.layout.dialog_password, null);
text = (TextView) dialogView.findViewById(R.id.pass_userPin);
Button ib0 = (Button) dialogView.findViewById(R.id.button0);
assert ib0 != null;
ib0.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "0");
}
});
Button ib1 = (Button) dialogView.findViewById(R.id.button1);
assert ib1 != null;
ib1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "1");
}
});
Button ib2 = (Button) dialogView.findViewById(R.id.button2);
assert ib2 != null;
ib2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "2");
}
});
Button ib3 = (Button) dialogView.findViewById(R.id.button3);
assert ib3 != null;
ib3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "3");
}
});
Button ib4 = (Button) dialogView.findViewById(R.id.button4);
assert ib4 != null;
ib4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "4");
}
});
Button ib5 = (Button) dialogView.findViewById(R.id.button5);
assert ib5 != null;
ib5.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "5");
}
});
Button ib6 = (Button) dialogView.findViewById(R.id.button6);
assert ib6 != null;
ib6.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "6");
}
});
Button ib7 = (Button) dialogView.findViewById(R.id.button7);
assert ib7 != null;
ib7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "7");
}
});
Button ib8 = (Button) dialogView.findViewById(R.id.button8);
assert ib8 != null;
ib8.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "8");
}
});
Button ib9 = (Button) dialogView.findViewById(R.id.button9);
assert ib9 != null;
ib9.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
enterNum(activity, dialogView, "9");
}
});
ImageButton enter = (ImageButton) dialogView.findViewById(R.id.imageButtonEnter);
assert enter != null;
final ImageButton cancel = (ImageButton) dialogView.findViewById(R.id.imageButtonCancel);
assert cancel != null;
cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
text.setText("");
}
});
final Button clear = (Button) dialogView.findViewById(R.id.buttonReset);
assert clear != null;
clear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ForgotPasswordDialog forgotPasswordDialog = new ForgotPasswordDialog();
forgotPasswordDialog.show(activity.getFragmentManager(), null);
}
});
builder.setView(dialogView);
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
activity.finishAffinity();
}
});
dialog = builder.create();
dialog.show();
enter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
login(activity, true);
}
});
}
}
use of run.wallet.iota.ui.dialog.ForgotPasswordDialog in project run-wallet-android by runplay.
the class PasswordLoginFragment method onPasswordForgotClick.
@OnClick(R.id.password_forgot)
public void onPasswordForgotClick() {
ForgotPasswordDialog forgotPasswordDialog = new ForgotPasswordDialog();
forgotPasswordDialog.show(getActivity().getFragmentManager(), null);
}
Aggregations