如何自定义TimePickerDialog? [英] How to customize a TimePickerDialog?

查看:204
本文介绍了如何自定义TimePickerDialog?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找创造的东西完全一样TimePickerDialog(外观)在Android中,但它是为分/秒,而不是小时/分。因此AM / PM并不相关,因此将允许一刻为大于24(使最大59)。

是否有可能改变以任何方式TimePickerDialog实例,以反映这一点?

任何和所有的建议都将大大AP preciated。 : - )

解决方案
  

是否有可能改变以任何方式TimePickerDialog实例,以反映这一点?

没有,但<一个href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/layout/time_picker_dialog.xml;h=d5a6b5eb9bc1725b8fa6d938b25a06f3b94c67aa;hb=HEAD"相对=nofollow>布局和<一href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/app/TimePickerDialog.java;h=a04b9e94405b62b966382f3607342883d802d703;hb=HEAD"相对=nofollow>来源$ C ​​$ C 以 TimePickerDialog 都可以作为一个起点,实现自己的对话框。

I'm looking to create something EXACTLY like TimePickerDialog (look and feel) in Android, but it would be for MINUTES/SECONDS, not HOURS/MINUTES. Therefore AM/PM would not be relevant and would therefore allow MINUTE to be greater than 24 (making the max 59).

Is it possible to change the TimePickerDialog instance in any way to reflect this?

Any and all suggestions would be greatly appreciated. :-)

解决方案

Is it possible to change the TimePickerDialog instance in any way to reflect this?

No, but the layout and source code to TimePickerDialog are both available as a starting point for implementing your own dialog.

这篇关于如何自定义TimePickerDialog?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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