在android中调整DatePicker的大小 [英] Resizing of DatePicker in android

查看:20
本文介绍了在android中调整DatePicker的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何减小 DatePicker 的大小(高度和宽度)?是否有任何可用的内置方法?

How can I reduce the size (height and width) of a DatePicker? Is there any built-in method available for this?

推荐答案

没有.您不能将视图的大小减小到超出其最小大小.使用 wrap_content 可确保 DatePicker 足够大以包含其内容.

No. You cannot reduce the size of a view beyond their minimum size. Using wrap_content ensures that the DatePicker is just big enough to enclose its contents.

<DatePicker
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
/>

这篇关于在android中调整DatePicker的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆