Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when using datepicker in android 4.0 and above..how to avoid the calender view

i have done a project in android 2.2 which contains a date picker and set the properties for it according to he size of screen but when i installed it in android 4.0...the date picker view includes a calender view ....what to do to avoid the calender view along with datepicker in android 4.0...below are the images of date picker in 2.2 and 4.1

android 2.2 image of date picker

android 4.1 image of date picker

like image 764
aravind varma Avatar asked Dec 04 '22 14:12

aravind varma


1 Answers

You can use yourDatepicker.setCalendarViewShown(false);

This method works in Api >= 11 .

like image 163
Chirag Avatar answered Jan 12 '23 01:01

Chirag