Resize android datepicker control

岁酱吖の 提交于 2019-12-05 04:16:05

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

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

Mar Bar

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

Add:

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

to your XML and change the size of DatePicker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!