【问题标题】:DatePickerDialog ICS - Get the date to display in the titleDatePickerDialog ICS - 获取标题中显示的日期
【发布时间】:2012-04-19 18:43:40
【问题描述】:

我最近刚刚将我的个人手机更新为 Android 4.0.4。这样做,我注意到我在应用程序中显示的DatePickerDialog 不再像以前的版本那样在标题栏中显示长日期格式:

它只是简单地说:“设置日期”。

那么,有没有一种快速的方法可以让这个特定的DatePickerDialog 始终在标题栏中显示长日期?或者这是我必须通过创建自己的自定义Dialog 来克服的版本限制?

【问题讨论】:

    标签: android dialog datepicker android-4.0-ice-cream-sandwich datepickerdialog


    【解决方案1】:

    那么,有没有一种快速的方法可以让这个特定的 DatePickerDialog 始终在标题栏中显示长日期?

    之前的更新标题逻辑已从 the current DatePickerDialog source code 中完全删除。您应该能够扩展 DatePickerDialog 并覆盖 onDateChanged()(和六参数构造函数)以恢复此功能,至少在理论上是这样——我从未尝试过。

    FWIW,here is a link to an older version of DatePickerDialog 具有更新标题逻辑。

    【讨论】:

    • 干杯伙伴,正是我想要的:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-22
    • 1970-01-01
    • 1970-01-01
    • 2015-01-08
    相关资源
    最近更新 更多