0

I using xamarin android, there is date picker which crash when running some devices with android 7.0 with security patch may 2017. Mostly if found in samsung. Following is the code to open datepicker. Can any one help how to fix this issue.

 var dailog =  new DatePickerDialog(this, HandleDateSet, CutOffDate.Year,CutOffDate.Month - 1, CutOffDate.Day);
 dailog.DatePicker.CalendarViewShown = true;
 dailog.DatePicker.SpinnersShown = false;

 return dailog;

Stack Trace

ankuranurag2
  • 2,300
  • 15
  • 30
  • I found similar thread but this is in Java, can only help me write the same code in Xamarin C#. I tried all samples of Xamarin using DatePicker all crash in Samsung updated to 7.0: https://stackoverflow.com/questions/43883974/error-inflating-class-android-widget-datepicker-on-android-version-7-0 – Younus Moosani Jun 19 '17 at 06:29
  • Have you read through https://developer.xamarin.com/guides/android/user_interface/date_picker/? – John Joe Jun 21 '17 at 14:47
  • Yes, I have followed and did multiple tries with apply try catch on lines and found that only Samsung with latest updated andriod 7.0 crashes, its is not happening on other devices I tried like Mate - 9. I found that its crashing on code : DatePickerDialog dialog = new DatePickerDialog(Activity, this, currently.Year, currently.Month, currently.Day); – Younus Moosani Jun 27 '17 at 15:48
  • post the log .. – John Joe Jun 27 '17 at 15:51
  • https://i.stack.imgur.com/bTRFT.png – Younus Moosani Jul 30 '17 at 17:37

0 Answers0