Open jmiguelrc opened 10 years ago
Before accepting this merge there is one thing to fix:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:allowBackup="true" android:name=".CalendarWeekdayLoader">
^^ Basically you are naming whole festival application as ".CalendarWeekdayLoader", which is not a best practice. Please find a another way to get your code work without changing application name.
This will not change the name of the application but will specify a class that will be executed before any other component. The "android:label" is what contains the application name. http://developer.android.com/guide/topics/manifest/activity-element.html#nm
I stand corrected.
However it seems that you can only specify one class for application whih is executed before any component. It should be not named after Calendar and weekdays, because if in future there is need for another things that are loaded at start up, they might have nothing to do with calendar and weekdays.
So one suggestion is that you create some other subclass, named liked FestivalAppLoader/something similar which then calls CalendarWeekdayLoader or does things that CalendarWeekdayLoader needs.
As suggested, I changed the class name to FestivalAppLoader. The class has the same functionality, it calls the load method of CalenderUtil class. The FestivalAppLoader can be used to pass the context to some load method in order to solve similar problems (load from resources outside activities).
Extra semicolons deleted
This is a fix to issue #21: weekdays are now fetched from "strings.xml". In order to obtain the context, class "ContextRetriever" was created. The Manifest was changed in order to allow this subclass of "Application" to be called before any other application component.