在Theme.Holo.Light上使用Theme.Light Datepicker

0 android android-layout android-theme

我有一个使用Theme.Holo.Light的活动,包含EditText,RadioButtons和DatePicker.我想使用Theme.Holo.Light进行整个活动,除了DatePicker,我想成为Theme.Light风格.我怎样才能做到这一点?

gia*_*200 5

你尝试过类似的东西吗?

<DatePicker
    ...
    style="@android:style/Widget.DatePicker"/>
Run Code Online (Sandbox Code Playgroud)

Holo使用@android:style/Widget.Holo.DatePickerwhile @android:style/Widget.DatePicker是你需要使用的.

链接:

样式列表

样式列表的源代码

更新:

似乎DatePicker是使用3个NumberPickers构建的.我的回答是正确的,但它是不完整的.我发现解决问题的最佳方法是重新创建自己的DatePicker(源代码中的copypaste),并为DatePicker和3 NumberPickers提供样式.

GitHub上布局的链接:

DatePicker布局