android numberpicker index outofbounds rotation

前端 未结 1 1059
Happy的楠姐
Happy的楠姐 2021-01-06 17:00

I am trying to create a custom time picker. But the problem that ran into is that when i rotate the screen. also if I press the home button to leave the app it crashes when

1条回答
  •  情歌与酒
    2021-01-06 17:45

    due to bug - try to set before u use NumberPicker object:

    NumberPicker.setSaveFromParentEnabled(false);       
    NumberPicker.setSaveEnabled(false);
    

    i opened a issue of this & other bug of number picker:

    reported picker bug at code.google

    0 讨论(0)
提交回复
热议问题