How can I open Android DatePickerDialog with specific locale like iOS -


i open datepickerdialog in dd/mm/yyyy format while phone locale set english(united stated) has default format "mm/dd/yyyy".

i know in ios have datepicker.locale method specify locale particular datepicker don't know how can android.

or there anyway can give datepicker our own date format ?

help needed!

thanks.

this may view

 datepickerdialog datepicker =new datepickerdialog(context, callback, year, monthofyear, dayofmonth) datepickerdialog(this);  try {     field f[] = datepicker.getclass().getdeclaredfields();     (field field : f)      {     log.i("field name :",field.getname())     } 

once have name of both fields want move (probably have guess it). can swap views .

convert field view :

            field.setaccessible(true);             object month = new object();             month = field.get(datepicker);             // ((view)month) typecast convert view 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -