To override the DatePicker format the best bet would be to override one of its constructors with a slight edit to the original code. You can edit the ViewGroup in code for you but I’d seriously consider not doing it that way.
- Create class LocalizedDatePicker
- Override public DatePicker (Context context, AttributeSet attrs, int defStyle) http://developer.android.com/reference/android/widget/DatePicker.html#DatePicker(android.content.Context, android.util.AttributeSet, int)
- Copy the code from the original DatePicker constructor (you may need to select a different branch after some testing, I have linked the head)
- Override methods that call reorderSpinners() to remove that call.
- Replace line
inflater.inflate(R.layout.date_picker, this, true);
withinflater.inflate(my.package.R.layout.localized_date_picker, this, true);
- Copy the original date_picker.xml layout to your local resource localized_date_picker.xml
- Edit the file for the desired order, since you’re editing this please respect the localization of other places and keep a copy of the original in your global layout folder and put the localized_date_picker.xml in your region specific folder. Since the system’s layout is Month Day Year people in other places may expect that order.