-
Notifications
You must be signed in to change notification settings - Fork 17
Configuration (Module)
MikeSu edited this page Aug 22, 2016
·
1 revision
- init view (month/week)
file: java/.../common/Config.java
line: 14 | private static final ViewPagerType INIT_VIEW;
set ViewPagerType.MONTH for month view, and ViewPagerType.WEEK for week view
example:
private static final ViewPagerType INIT_VIEW = ViewPagerType.MONTH;
- init date
file: java/.../common/Config.java
line: 17 | public static final DateTime INIT_DATE
set init date (where calendar should be set after opening)
example:
public static final DateTime INIT_DATE = new DateTime(); // today
- time range
file: java/.../common/Config.java
line: 15 | private static final int RANGE_MONTHS_BEFORE_INIT
line: 16 | private static final int RANGE_MONTHS_AFTER_INIT
set range in months before and after INIT_DATE, values in Integer
example:
private static final int RANGE_MONTHS_BEFORE_INIT = 1;
private static final int RANGE_MONTHS_AFTER_INIT = 3;
- first day of week
file: java/.../common/Config.java
line: 18 | public static final FirstDay FIRST_DAY_OF_WEEK
set first day of week (Sunday/Monday)
example:
public static final FirstDay FIRST_DAY_OF_WEEK = FirstDay.MONDAY;
- cell background (weekend/non weekend)
file: java/.../common/Config.java
line: 19 | public static final int CELL_WEEKEND_BACKGROUND
line: 20 | public static final int CELL_NON_WEEKEND_BACKGROUND
set background for weekendend (2) and non weekendend (1) days
example:
public static final int CELL_WEEKEND_BACKGROUND = Color.parseColor("#FFF9DB");
public static final int CELL_NON_WEEKEND_BACKGROUND = Color.WHITE;
- cell text color (Month View)
file: java/.../common/Config.java
line: 21 | public static final int CELL_TEXT_CURRENT_MONTH_COLOR
line: 22 | public static final int CELL_TEXT_ANOTHER_MONTH_COLOR
set text color for current month (2), past (1) and future (3)
example:
public static final int CELL_TEXT_CURRENT_MONTH_COLOR = Color.BLACK;
public static final int CELL_TEXT_ANOTHER_MONTH_COLOR = Color.LTGRAY;
- day label
file: java/.../common/Config.java
line: 23 | public static final boolean USE_DAY_LABELS
set true (visible) or false (gone)
example:
public static final boolean USE_DAY_LABELS = true;
file: java/.../commons/Constants.java
line: 10 | public static final String[] NAME_OF_DAYS
Day labels
example:
public static final String[] NAME_OF_DAYS = new String[]{"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
- collapse behavior
file: java/.../common/Config.java
line: 24 | public static final boolean SCROLL_TO_SELECTED_AFTER_COLLAPSE
set true to collapse to selected date (if possible) and false to collapse to first week
example:
public static final boolean SCROLL_TO_SELECTED_AFTER_COLLAPSE = true;
- animation duration
file: java/.../common/Constants.java
line: 14 | public static final int ANIMATION_ALPHA_DURATION
line: 15 | public static final int ANIMATION_SIZE_DURATION
set animation duration values in milliseconds, alpha for change opacity, size for change size (between month and week views)
example:
public static final int ANIMATION_ALPHA_DURATION = 300;
public static final int ANIMATION_SIZE_DURATION = 200;


