我的活动有以下法典。
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// set time picker values
TimePicker picker = (TimePicker) findViewById(R.id.startTimePicker);
picker.setIs24HourView(true);
picker.setCurrentHour(10);
picker.setCurrentMinute(15);
}
So a time picker is set to a fixed time, this works as expected. But when I rotate the screen and the activity get s recreated the time picker show in all fields the same value - not the value set. This happens on one, two or more time pickers on screen.
是否有人解释这种令人厌恶的行为?