Skip to content

Commit

Permalink
update for v2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KingsMentor committed Jul 31, 2017
1 parent 5451f7b commit 8620188
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions luhn/src/main/java/xyz/belvi/luhn/Luhn.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public static void startLuhn(Context context, LuhnCallback luhnCallback, @StyleR
);
}

public static void startLuhn(Context context, LuhnCallback luhnCallback, Bundle cardIOBundle) {
sLuhnCallback = luhnCallback;
context.startActivity(new Intent(context, Luhn.class)
.putExtra(CARD_IO, cardIOBundle)
);
}

public static void startLuhn(Context context, LuhnCallback luhnCallback, Bundle cardIOBundle, @StyleRes int style) {
sLuhnCallback = luhnCallback;
context.startActivity(new Intent(context, Luhn.class)
Expand Down Expand Up @@ -387,6 +394,7 @@ private void initOtp(final int otpLength) {
@Override
public void run() {
otpInputLayout.requestFocus();
showKeyboard();
otpInputLayout.getPasswordToggleView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down Expand Up @@ -459,6 +467,14 @@ private void hideKeyboard() {
}
}

private void showKeyboard() {
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(view, 0);
}
}

private void dismiss(View v) {
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
Expand Down

0 comments on commit 8620188

Please sign in to comment.