Java tutorial
//package com.java2s; import java.util.Calendar; import android.content.Context; import android.text.format.Time; public class Main { /** * Get first day of week as android.text.format.Time constant. * * @return the first day of week in android.text.format.Time */ public static int getFirstDayOfWeek(Context context) { int startDay = Calendar.SUNDAY; if (startDay == Calendar.SATURDAY) { return Time.SATURDAY; } else if (startDay == Calendar.MONDAY) { return Time.MONDAY; } else { return Time.SUNDAY; } } }