是否可以更改Android L TimePickerDialog的样式? [英] Is it possible to change the style of an Android L TimePickerDialog?

查看:143
本文介绍了是否可以更改Android L TimePickerDialog的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Android L模拟器上测试我的应用程序,并且我注意到TimePickerDialog已显着更改为:

I was testing my app on an Android L emulator, and I noticed that the TimePickerDialog has significantly changed to this:

这与我的应用程序主题不符,我想知道在Android L上运行时是否有可能获得旧的TimePickerDialog样式.

This doesn't fit with the theme of my app, and I wanted to know if it is possible to get the old TimePickerDialog style when running on Android L.

推荐答案

您可以使用

You can use the TimePickerDialog constructor with theme parameter to specify the theme.

TimePickerDialog(Context context, 
                 int theme, 
                 TimePickerDialog.OnTimeSetListener callBack, 
                 int hourOfDay, 
                 int minute, 
                 boolean is24HourView)

这篇关于是否可以更改Android L TimePickerDialog的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆