I have create a number picker using this code - Number Picker
But the output looks something like this -
But I want it to look something like -
I want to display the Cancel and set buttons as given in image.
But when I try this code, it shows error - The method setButton(int, String, Dialog) is undefined for the type Dialog.
Dialog noPicker = new Dialog(MainActivity.this);
noPicker.setButton(Dialog.BUTTON_POSITIVE, "Ok", noPicker);
noPicker.setButton(Dialog.BUTTON_NEGATIVE, "Cancel", noPicker);
Any ideas on how to resolve this?