如何显示最新DatePickerDialog和TimePickerDialog机器人 [英] How to display latest DatePickerDialog and TimePickerDialog android
问题描述
我猜我创造这些对话框的时候,因为我无法找到我遇到的问题有任何疑问做一些基本的错误。
I guess i am doing some basic mistake when creating these dialogs as i couldn't find any questions on the issue i am having.
我想在我的应用显示(时间和日期从3.0中引入)最新的对话,我跟着从的开发者的网站。我的应用程序支持从4.0及以上的只有设备,因此这不应该是一个问题。
I am trying to show the latest dialogs (introduced from 3.0 for time and date) in my application and i followed the link from developer's site. My application supports only devices from 4.0 and above, so this shouldn't be a problem.
我想,当我点击按钮来调用的日期或时间选择器,我会看到类似下面...
I thought, when i click on the button to invoke the date or time picker, i will be seeing something like below...
不过,这里是什么我得到...我认为这是一个古老的日期选取器
But, here is what i am getting... which i think is a old Date Picker
我的按钮触发对话框XML。
My XML for button that triggers the dialog..
<Button
android:id="@+id/button_end_date"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="showDatePickerDialog"
android:text="@string/button_enddate" />
对于Java而言,我添加了从开发者的网站上的code和我想这是不是在这里需要的。
For the java part, i added the code from the developer's site and i guess that's not needed here.
我究竟做错了什么?
推荐答案
有关使用全息主题,在 styles.xml
您的应用程序的主题必须具有 Theme.Holo。*
父。
For using Holo Theme, your Application theme in styles.xml
must have Theme.Holo.*
parent.
我爱:
<style name="AppTheme" parent="@style/Theme.Holo.Light"> ... </style>
or
<style name="AppTheme" parent="@style/Theme.Holo"> ... </style>
这篇关于如何显示最新DatePickerDialog和TimePickerDialog机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!