Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide header in CalendarView in DatePicker?

How can I hide the header on the screenshot below?

enter image description here

like image 289
Semen Tykhonenko Avatar asked Jun 20 '15 00:06

Semen Tykhonenko


4 Answers

Use a CalendarView instead. Looks the same as a DatePicker, just does not have a header.

like image 162
Chris Hare Avatar answered Oct 17 '22 07:10

Chris Hare


Just use calendar view:

<CalendarView
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>
like image 31
Nrohpos Avatar answered Oct 13 '22 01:10

Nrohpos


In order to display DatePicker as calendar view, without a header, you can switch to spinner mode and hide the spinner, i.e.:

<DatePicker
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:datePickerMode="spinner"
   android:spinnersShown="false" />
like image 5
Ramps Avatar answered Oct 17 '22 07:10

Ramps


You could not do much about it, what you can do is forced to be a spinner

<DatePicker
    ...
    android:datePickerMode="spinner" />

Or just create your own custom datePicker http://www.mysamplecode.com/2011/10/android-datepickerdialog.html

like image 1
Helmi Avatar answered Oct 17 '22 05:10

Helmi