开发者

Resize android datepicker control

开发者 https://www.devze.com 2023-01-07 18:09 出处:网络
How can one resize the initial size of android datepicker control to be smaller or bigger.开发者_开发百科 Is there only way to reimplement it?I haven\'t been able to figure out a way to resize it, but

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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消