7

How can one resize the initial size of android datepicker control to be smaller or bigger. Is there only way to reimplement it?

Artem Barger
  • 40,769
  • 9
  • 59
  • 81

4 Answers4

7

I haven't been able to figure out a way to resize it, but have seen implementations where they utilize the DatePicker as a dialog. The date is rendered as TextView with an edit button, which launches the DatePicker dialog. It saves screen real estate when not editing...

http://developer.android.com/resources/tutorials/views/hello-datepicker.html

Mike L
  • 4,693
  • 5
  • 33
  • 52
3

To resize the datepicker go the xml and and add android:scaleX and android:scaleY to the appropriate size you need.

superuserdo
  • 1,637
  • 3
  • 21
  • 33
0

Try playing with weight sum inside a restricted container (such as by the screen size or forced padding). I've posted in another thread how did it work for me quite well

Community
  • 1
  • 1
Mar Bar
  • 477
  • 6
  • 11
0

Add:

android:scaleX=""
android:scaleY=""

to your XML and change the size of DatePicker

sabith.ak
  • 255
  • 4
  • 12