Created
December 13, 2017 14:04
-
-
Save DawnImpulse/bcde515eb3cc85641dac11f88ae42137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog dialog = null; | |
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this); | |
final EditText editText; | |
dialogBuilder.setTitle("Edit Balance "); | |
LayoutInflater inflater = getLayoutInflater(); | |
View dialogView = inflater.inflate(R.layout., null); | |
dialogBuilder.setView(dialogView); | |
editText = (EditText) dialogView.findViewById(R.id.alert_edit_text); | |
dialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialogInterface, int i) { | |
} | |
}); | |
dialogBuilder.setNegativeButton("CANCEL", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialogInterface, int i) { | |
} | |
}); | |
dialog = dialogBuilder.create(); | |
dialog.show(); | |
final AlertDialog finalDialog = dialog; | |
dialog.getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
} | |
}); | |
dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
finalDialog.dismiss(); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment