Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize android datepicker control

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

like image 829
Artem Barger Avatar asked Jul 15 '10 20:07

Artem Barger


People also ask

How can I change DatePicker size in android?

For example, android:layout_width="15dp" will set the width at a scalable value of 15. You can change 15 to whatever you want. If you want to set a specific pixel size, you can use, for example, 15px .

How do I make my DatePicker smaller?

Instead of using "dp" for the layout width , use percentages in weight to make it smaller. For android:layout_weight to be effective, put android:layout_width to 0 dip.

What is DatePicker in android Studio?

Android DatePicker is a widget to select date. It allows you to select date by day, month and year. Like DatePicker, android also provides TimePicker to select time.


1 Answers

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

like image 128
Mike L Avatar answered Oct 17 '22 19:10

Mike L