Code example for Calendar

Methods: get, setTime

0
		return new ViewGroup.LayoutParams(w, h);
	} 
 
	public static void configureDatePicker(DatePicker datePicker, Date date, DatePicker.OnDateChangedListener onDateChangedListener) {
		Calendar calendar = Utils.getCalendar();
		calendar.setTime(date);
		int m = calendar.get(Calendar.MONTH);
		int y = calendar.get(Calendar.YEAR);
		int d = calendar.get(Calendar.DAY_OF_MONTH);
		datePicker.init(y, m, d, onDateChangedListener);
	} 
 
	static public String lookupStringResourceForKey(Context ctx, String k) {
		int id = ctx.getResources().getIdentifier(ctx.getPackageName() + ":string/" + k, null, null);
		return ctx.getString(id);
	} 
 
	public static Date dateFromPrincipalIntegers(int y, int m, int d) {
		Calendar calendar = Utils.getCalendar();
		calendar.set(Calendar.YEAR, y);
		calendar.set(Calendar.MONTH, m);