ok, I see the problem now. It does not set currentHour correctly in the new 24-hour format, so you got 9:05 instead of 21:05. I guess it's not 9am where you are! This is a mistake, as mentioned in this question, it seems the only work around, for now, is to do something like:
timePicker = (TimePicker) findViewById(R.id.timePicker1); timePicker.setIs24HourView(true); timePicker.setCurrentHour(Calendar.get(Calendar.HOUR_OF_DAY));
I see that you tried cal.HOUR_OF_DAY, but did not provide the code that you used, but try this and see if it helps.
source share