Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple UX improvements #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/android/PinDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@
import org.json.JSONObject;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.text.InputType;
import android.text.method.PasswordTransformationMethod;
import android.view.WindowManager;
import android.widget.EditText;


public class PinDialog extends CordovaPlugin {

public ProgressDialog spinnerDialog = null;

public PinDialog() {
}

Expand Down Expand Up @@ -108,9 +106,11 @@ public void onCancel(DialogInterface dialog){
}
});

dlg.create();
dlg.show();

AlertDialog instance = dlg.create();
instance.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
instance.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
instance.show();
promptInput.requestFocus();
};
};
this.cordova.getActivity().runOnUiThread(runnable);
Expand Down
2 changes: 1 addition & 1 deletion src/ios/CDVPinDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ - (void)prompt:(CDVInvokedUrlCommand*)command
}


- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
- (void)alertView:(UIAlertView*)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
CDVPluginResult* result;

Expand Down