By default you have "set" and "cancel", I would like to change the "set" label to "Find".
Is it possible?
By default you have "set" and "cancel", I would like to change the "set" label to "Find".
Is it possible?
Try
yourTimePickerDialog.setButton(BUTTON_POSITIVE, "Find", yourTimePickerDialog);
TimePickerDialog tp = new TimePickerDialog(this, mTimeSetListener, 0, 0, false);
tp.setButton(DialogInterface.BUTTON_POSITIVE, "OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
if (which == DialogInterface.BUTTON_POSITIVE)
{
}
}
});
tp.setButton(DialogInterface.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
if (which == DialogInterface.BUTTON_NEGATIVE)
{
}
}
});
try using the above code..
Better create a xml file with time picker and two buttons as you need.
Then you can manually launch a alert dialog with view set to this xml file.
You can set the text as you want to both the buttons also you can manually handle the click events for both the buttons.