DatePickerDialog display year picker first

前端 未结 2 989
执念已碎
执念已碎 2021-02-07 19:19

I want my DatePickerDialog as soon as it opens to display the list of years.

For example, when I show the dialog I see the calendar view:

2条回答
  •  无人及你
    2021-02-07 20:02

    Same as Show year selection first in Android Calendar View

    I will copy here my answer:

    You can get a reference to year view and then just simulate user click to open it.

    dataPicker.getTouchables().get( 0 ).performClick();
    

提交回复
热议问题