Android Open Source - CalendarWidget Resource Helper






From Project

Back to project page CalendarWidget.

License

The source code is released under:

MIT License

If you think the Android project CalendarWidget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package co.sfng.calendarwidget;
/*from w  w w .ja  v a 2  s  .com*/
public class ResourceHelper {

    @SuppressWarnings("unused")
    private static final int DARK_THEME = 0;
    private static final int LIGHT_THEME = 1;

    public static int layoutCellDay(int theme) {
        return theme == LIGHT_THEME ? R.layout.cell_day_light : R.layout.cell_day_dark;
    }

    public static int layoutCellToday(int theme) {
        return theme == LIGHT_THEME ? R.layout.cell_today_light : R.layout.cell_today_dark;
    }

    public static int layoutCellInMonth(int theme) {
        return theme == LIGHT_THEME ? R.layout.cell_in_month_light : R.layout.cell_in_month_dark;
    }

    public static int layoutWidget(int theme) {
        return theme == LIGHT_THEME ? R.layout.widget_light : R.layout.widget_dark;
    }

}




Java Source Code List

co.sfng.calendarwidget.AppWidgetConfigureActivity.java
co.sfng.calendarwidget.CalendarWidgetProvider.java
co.sfng.calendarwidget.DayOfWeekHelper.java
co.sfng.calendarwidget.ResourceHelper.java
co.sfng.calendarwidget.SettingsFragment.java