eltohamy / material-hijri-calendarview

A Material design back port of Android's Hijri CalendarView
https://github.com/eltohamy/material-hijri-calendarview
Apache License 2.0
58 stars 13 forks source link

Hijri Calendar - com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_fr_FR', key '' #15

Closed lukamodric10 closed 6 years ago

lukamodric10 commented 6 years ago

hi trying to add Hijri calendar to my Android App i got this ressource on github HIJRI CALENDARE and as it said i added the two dependencies and the xlm in my Activity exactly the same all work fine ! but when my App starts i get an error that i don't know what it is !

heres my Log :

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mon.muslim/com.example.mon.muslim.Map}: android.view.InflateException: Binary XML file line #9: Error inflating class com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2699) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5930) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView at android.view.LayoutInflater.createView(LayoutInflater.java:633) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.example.mon.muslim.Map.onCreate(Map.java:18) at android.app.Activity.performCreate(Activity.java:6178) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2652) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5930) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.example.mon.muslim.Map.onCreate(Map.java:18) at android.app.Activity.performCreate(Activity.java:6178) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2652) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2773) at android.app.ActivityThread.access$900(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5930) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) Caused by: java.util.MissingResourceException: Can't find resource for bundle 'com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_fr_FR', key '' at java.util.ResourceBundle.missingResourceException(ResourceBundle.java:238) at java.util.ResourceBundle.getBundle(ResourceBundle.java:230) at java.util.ResourceBundle.getBundle(ResourceBundle.java:159) at com.github.msarhan.ummalqura.calendar.UmmalquraDateFormatSymbols.initializeData(UmmalquraDateFormatSymbols.java:91) at com.github.msarhan.ummalqura.calendar.UmmalquraDateFormatSymbols.(UmmalquraDateFormatSymbols.java:66) at com.github.msarhan.ummalqura.calendar.UmmalquraCalendar.getDisplayName(UmmalquraCalendar.java:325) at com.github.eltohamy.materialhijricalendarview.format.DateFormatTitleFormatter.format(DateFormatTitleFormatter.java:42) at com.github.eltohamy.materialhijricalendarview.TitleChanger.doChange(TitleChanger.java:68) at com.github.eltohamy.materialhijricalendarview.TitleChanger.change(TitleChanger.java:51) at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView.updateUi(MaterialHijriCalendarView.java:373) at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView.access$600(MaterialHijriCalendarView.java:67) at com.github.eltohamy.materialhijricalendarview.MaterialHijriCalendarView$2.onPageSelected(MaterialHijriCalendarView.java:184) at android.support.v4.view.ViewPager.dispatchOnPageSelected(ViewPager.java:1935) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:659) at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:625) at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:617) at com.git

Help Please .. Thanks !!!

iballan commented 6 years ago

I have faced this problem trying to support Turkish language. UmmalquraCalendar can format only Arabic and English. If you try to format to other language it will crash.

I saw from the error log you were trying to format French: 'com.github.msarhan.ummalqura.calendar.text.UmmalquraFormatData_fr_FR', key ''

I added support to Turkish language in this repositary: https://github.com/iballan/ummalqura-calendar

Specifically checkout this folder: https://github.com/iballan/ummalqura-calendar/tree/master/src/main/java/com/github/iballan/ummalqura/calendar/text

lukamodric10 commented 6 years ago

yes , your right i switched the phone language to english and it's works fine .. thank you so much you have any idea how i can add support to French language ??? also it's showing that it's 12 Ramadan and we are in 11 Ramadan , How can I fix that ??