Clean code
This commit is contained in:
parent
5596625d3c
commit
b0cbae5702
|
|
@ -445,7 +445,7 @@ public class API {
|
||||||
FrameLayout frame = new FrameLayout(Init.context());
|
FrameLayout frame = new FrameLayout(Init.context());
|
||||||
EditText input = new EditText(Init.context());
|
EditText input = new EditText(Init.context());
|
||||||
frame.addView(input, params);
|
frame.addView(input, params);
|
||||||
dialog = new AlertDialog.Builder(Init.getActivity()).setTitle("請輸入Token").setView(frame).setNegativeButton(android.R.string.cancel, (dialog, which) -> onNegative()).setPositiveButton(android.R.string.ok, (dialog, which) -> onPositive(input.getText().toString())).show();
|
dialog = new AlertDialog.Builder(Init.getActivity()).setTitle("請輸入Token").setView(frame).setNegativeButton(android.R.string.cancel, null).setPositiveButton(android.R.string.ok, (dialog, which) -> onPositive(input.getText().toString())).show();
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -459,15 +459,6 @@ public class API {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onNegative() {
|
|
||||||
try {
|
|
||||||
dialog.dismiss();
|
|
||||||
Init.getActivity().finish();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showQRCode(Data data) {
|
private void showQRCode(Data data) {
|
||||||
try {
|
try {
|
||||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(Utils.dp2px(240), Utils.dp2px(240));
|
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(Utils.dp2px(240), Utils.dp2px(240));
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
e1c6d4103c73f8fd333acdda1dfab6f7
|
d363f8bc338d10a6fe558e148a3f5d65
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue