Android Open Source - vitdroid-android Year Labeler

From Project

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.

Java Source Code

//from  www.  j a  va  2  s  .c om
import java.util.Calendar;


 * A Labeler that displays months
public class YearLabeler extends Labeler {
    private final String mFormatString;

    public YearLabeler(String formatString) {
        super(200, 60);
        mFormatString = formatString;

    public TimeObject add(long time, int val) {
        return timeObjectfromCalendar(Util.addYears(time, val));

    protected TimeObject timeObjectfromCalendar(Calendar c) {
        return Util.getYear(c, mFormatString);

Java Source Code List