Code example for Calendar

Methods: getsetTimeInMillis

0
 
        private void setTime(long timeInMillis) {
            if (calendar == null) {
                calendar = Calendar.getInstance();
            } 
            calendar.setTimeInMillis(timeInMillis);
            month = calendar.get(Calendar.MONTH);
            year = calendar.get(Calendar.YEAR);
            day = calendar.get(Calendar.DAY_OF_MONTH);
        } 
    } 
 
    public SimpleMonthAdapter(Context context,
            DatePickerController controller) {
        mContext = context;
        mController = controller;
        init(); 
        setSelectedDay(mController.getSelectedDay());
    } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE