DatePicker is taking up a lot of space. I just want to display the tabs for date, month and year and no calendar. Is it possible?
Asked
Active
Viewed 507 times
-3
-
1duplicate of http://stackoverflow.com/questions/9462448/how-to-turn-off-calendarview-in-a-datepicker and http://stackoverflow.com/questions/13670695/why-does-the-datepicker-add-a-calendar-in-my-view and probably others. – CommonsWare Sep 24 '14 at 11:45
-
1http://www.mkyong.com/android/android-date-picker-example/ – Naveen Tamrakar Sep 24 '14 at 11:46
-
just use this,dueDatePicker.setCalendarViewShown(false); – prakash Sep 24 '14 at 11:47
-
minDateSelector.setCalendarViewShown(false); – Amitabh Sarkar Sep 24 '14 at 11:53
1 Answers
0
If you are targeting a later version of the API, you can use the following XML (no need to write Java code) in your
android:calendarViewShown="false"
The method in DatePicker
public void setCalendarViewShown (boolean shown);
e.g. : dateselecter.setCalendarViewShown(false);

Maveňツ
- 1
- 12
- 50
- 89

Prashant Jajal
- 3,469
- 5
- 24
- 38