DatePicker crash in samsung with android 5.0

前端 未结 3 1803
有刺的猬
有刺的猬 2020-12-29 04:12

I am having trouble with creating a datepicker in samsung note 2 device with lollipop 5.0. The exception is:

java.util.IllegalFormatConversionException: %d c         


        
3条回答
  •  不思量自难忘°
    2020-12-29 04:47

    As alanv noticed, this is a bug of Samsung's Android 5 implementation.

    I set up a different theme which shows the date picker with the (older) spinners instead of the calendar view. In the code, I check if the app is running on a samsung device with lollipop and a language other then english, and if so, I apply the theme with the spinners. This works well and there are no other libraries or other hacks necessary.

    If needed I can add the theme and how to apply it to this answer.

提交回复
热议问题