Usted puede overrite la
public void onTimeChanged (TimePicker view, int hourOfDay, int minute)
method of TimePickerDialog to completely remove AM/PM:
class MyTimePickerDialog extends TimePickerDialog {
MyTimePickerDialog(Context context, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView) {
super(context, callBack, hourOfDay, minute, is24HourView);
}
@Override
public void onTimeChanged (TimePicker view, int hourOfDay, int minute) {
// to prevent the dialog from changing the title which by default contains AM/PM
}
}
Aquí está cómo usarlo
MyTimePickerDialog dialog = new MyTimePickerDialog(getActivity(), this, hour, minute,
true /*DateFormat.is24HourFormat(getActivity())*/);
dialog.setTitle("Set Time");
Simplemente curioso, pero ¿por qué tiene que estar en el diseño y no en el código? – brianestey