Show Only Current month in Calendar View Android (or) Either Disable the Scroll View in Calendar View .......
Code for Displaying Calendar that i have written
<CalendarView
android:id="@+id/calendar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:showWeekNumber="false"
android:shownWeekCount="5"
android:scrollbars="none"/>
How Can I Show Only Current Month.....?Please Help Me Guys Thanks In Adcance.
Whithin your class you can show all the way up to the end of the current month with:
//get month and get how many days in current month
Calendar calendar = Calendar.getInstance();
int daysInMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
cal.setMaxDate(daysInMonth);
I don't beleive your android:scrollbars="none"
is doing anything for you.
You could also try something like this one .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With