How to set datePickerMode=“spinner” programmatically?

前端 未结 2 2228
醉酒成梦
醉酒成梦 2021-02-20 00:47

I need create DatePicker programmatically. And i can\'t use xml layout. i know set spinner in xml datePickerMode=\"spinner\" and then i can use datePicker.set

2条回答
  •  既然无缘
    2021-02-20 01:24

    If you want to set it programmatically you can you the below code but I haven't checked this code whether its working or not. Let me know if I can help you in any other way.

    datepickerDialog_object.getDatePicker().setSpinnersShown(true);
    datepickerDialog_object.getDatePicker().setCalendarViewShown(false);
    

提交回复
热议问题