のようにそのポップアップを作成するための方法で作成します。重複した質問を投稿する停止してください
public void showAlert() {
/* Layout that is shown inside the alert */
LayoutInflater factory = LayoutInflater.from(mContext);
//create a layout that is shown inside ur popup and give its name over here
final View calibrateView = factory.inflate(your layout, null);
EditText username = (EditText)calibrateView.findViewById(R.id.username);
EditText password = (EditText)calibrateView.findViewById(R.id.password);
/* Creating the popup */
AlertDialog.Builder alert = new AlertDialog.Builder(mContext);
alert.setView(calibrateView);
alert.setTitle(your title);
alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//check whether username and password is present over here.
//if present give ur intent code for moving to the next activity
//if absent, then create an alert showing the error msg
}
});
alert.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
/* called when AlertDialog "Cancel" button is pressed. */
public void onClick(DialogInterface dialog, int whichButton) {
}
});
alert.create();
alert.show();
}
を。 –