I have a DatePicker where I disabled SpinnerView and now use CalendarView. But it starts on Sunday, and I would like to use Monday as the first day of the week. How can i change this? I guessed that the first day would depend on the settings of the phone, but on my Swiss phone it is still wrong ...
I did not find any given method or any XML command.
<DatePicker android:id="@+id/date_picker" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" />
and
DatePicker datePicker = (DatePicker) convertView.findViewById(R.id.date_picker); datePicker.setSpinnersShown(false);
------------ EDIT: ------------
I tried changing the locale:
Locale.setDefault(Locale.GERMAN);
But this did not change the air. So I read the file android.17.android.widget.DatePicker.java, where I found out:
public DatePicker(Context context, AttributeSet attrs, int defStyle) {
So why does Locale.setDefault (Locale.GERMAN) not work ?! As you can see above, I get a DatePicker from XML .. is there an error ?!
source share