Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/111.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android DatePickerDialog月显示为数字(一月为1)_Android_Android Datepicker - Fatal编程技术网

Android DatePickerDialog月显示为数字(一月为1)

Android DatePickerDialog月显示为数字(一月为1),android,android-datepicker,Android,Android Datepicker,我必须在DatePickerDialog中显示月份的编号,而不是月份名称。 示例:02年2月,05年5月 最简单的方法是什么 我现在使用的主题是Theme_HOLO_LIGHT 像这样使用 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_paren

我必须在DatePickerDialog中显示月份的编号,而不是月份名称。 示例:02年2月,05年5月 最简单的方法是什么

我现在使用的主题是Theme_HOLO_LIGHT

像这样使用

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<my.pkg.NewDatePicker
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />
</LinearLayout>

像这样使用

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<my.pkg.NewDatePicker
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />
</LinearLayout>

'if(TextUtils.equals(field.getName(),“mMonthPicker”)
此语句永远不会满足要求。字段集中没有字段返回此名称。
'if(TextUtils.equals(field.getName(),“mMonthPicker”)
此语句永远不会满足。字段集中没有字段返回此名称。