问题描述
我创建了一个 DatePickerDialog
:
DatePickerDialog datePickerDialog =新DatePickerDialog(getActivity(),这,年,月,日);
,并显示在的Android 4.0.3(API 15)设备,它看起来像这样:
正如你看到上面的取消按钮在左侧显示,而设置按钮位于右侧。但是在Android 2.3.3,按键顺序是周围的其他方法。
所以,我怎样才能改变按钮 DatePickerDialog
的'为了以示设置的左侧按钮, 取消的Android 4.0.3 设备上右侧的按钮?
You don't. Either you leave them alone, or you create your own dialog with your own DatePicker
that has the buttons in the wrong order.
Please bear in mind that most users of Android apps use more than just your Android app. They actually use other apps. Some of those other apps will use a DatePickerDialog
, and those dialogs will have the button order as shown in your screenshot. It is much more important for your users for you to stick to the device standard (so all their DatePickerDialogs
work the same) than it is for you to force the wrong button order on some devices.
这篇关于更改按钮的DatePickerDialog顺序为Android 4.0.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!