I have tried multiple suggestions and nothing works :( I am trying to make the number keypad show up when this alert dialog box is show. Is there just some command to make the keyboard show up anyway?
void GetQuantity()
{
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Quantity");
alert.setMessage("Enter Quantity");
final EditText input = new EditText(this);
alert.setView(input);
input.setText("1");
input.setInputType(DEFAULT_KEYS_DIALER |TYPE_NUMBER_FLAG_DECIMAL );
input.setFilters(new InputFilter[] {
// Maximum 5 characters.
new InputFilter.LengthFilter(5),
});
alert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Quantity =Double.parseDouble( input.getText().toString());
btnQuan.setText(input.getText().toString());
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// do nothing
}
});
alert.show();
}