Android uses DatePicker and TimerPicker to set calendar date and time

Problem Description:

The Android embedded device I use here, version 5.1, sdk22, and other higher versions are similar, but it involves the problem that the phone cannot be executed without root commands, and we will study it later. At present, many mobile phones are Android10, 11, and 12 versions. You can refer to the documentation of sdk32 for this

DatePicker  |  Android Developers

As for if you are using the Android CalendarView control, you need to add functions yourself, such as setting the currently displayed calendar view, range, etc. In fact, DatePicker is also encapsulated from the CalendarView control, and you can find calendarview on the Internet. The controls are all the calendarview controls of customize Android.

Solution:

 The DatePicker and TimerPicker controls use the spinner mode, because this is more convenient to operate. Of course, the calendar mode or clock mode is also available, and you can choose it yourself.

Guess you like

Origin blog.csdn.net/poolooloo/article/details/128829538