Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the Week numbers in the CalendarView (DatePicker)

I am new to Android (and Java), please help me with this problem.

I am trying to hide the week numbers in the CalendarView in the DatePicker, found a Boolean set to true called:

mShowWeekNumber

inside

mCalendarView

in the DatePicker, but how can I set this value to false....??

Any help will be appreciated.

like image 760
pvalle Avatar asked Jul 23 '13 02:07

pvalle


2 Answers

You can set it in the layout file.

By configuring the CalendarView to android:showWeekNumber="false":

<CalendarView
    android:layout_width="match_parent"
    android:layout_height="301dp"
    android:id="@+id/calendarView"
    android:layout_gravity="center_horizontal"
    android:showWeekNumber="false"/>
like image 99
Sandy D. Avatar answered Sep 21 '22 23:09

Sandy D.


[This text of this answer was originally written by Vikram]

Set mCalendarView.setShowWeekNumber(false)

like image 23
3 revs, 2 users 67% Avatar answered Sep 19 '22 23:09

3 revs, 2 users 67%