Articles → ANDROID → CalendarView in android

CalendarView in android






What is CalendarView?





Example











Click to Enlarge



CalendarView dp = (CalendarView) findViewById(R.id.dpPicker);

dp.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {

    @Override
    public void onSelectedDayChange(CalendarView view, int year, int month, int dayOfMonth) {
        TextView textView = (TextView) findViewById(R.id.tvGetDate);
        textView.setText(String.valueOf(year) +
            "-" + String.valueOf(month) + "-" + String.valueOf(dayOfMonth));
    }
});





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, November 24, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250