开发者

how to customize DatePickerDialog?

开发者 https://www.devze.com 2023-02-09 23:11 出处:网络
i want to customize DatePickerDialog. My core objective is to ch开发者_C百科ange the theme of whole DatePickerDialog.

i want to customize DatePickerDialog. My core objective is to ch开发者_C百科ange the theme of whole DatePickerDialog.

is this possible to customize the theme of DatePickerDialog.

if this not possible then i want the sample code for any date picker.


You try set style for it

style

<style name="MyPickerDialog" parent="Theme.AppCompat.Light.Dialog.Alert">
    <item name="android:colorAccent">@color/primary</item>
</style>

Set style for dialog

DatePickerDialog dialog = new DatePickerDialog(context, R.style.MyPickerDialog);
dialog.show();

Hope this help.

0

精彩评论

暂无评论...
验证码 换一张
取 消