Back to project page vitdroid-android.
The source code is released under:
Apache License
If you think the Android project vitdroid-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.googlecode.android.widgets.DateSlider.labeler; /*from w ww . jav a 2 s.c om*/ import java.util.Calendar; import com.googlecode.android.widgets.DateSlider.TimeObject; /** * A Labeler that displays months */ public class MonthLabeler extends Labeler { private final String mFormatString; public MonthLabeler(String formatString) { super(180, 60); mFormatString = formatString; } @Override public TimeObject add(long time, int val) { return timeObjectfromCalendar(Util.addMonths(time, val)); } @Override protected TimeObject timeObjectfromCalendar(Calendar c) { return Util.getMonth(c, mFormatString); } }