如何自定义日期选取器的宽度和高度的机器人自定义、宽度、机器人、高度

2023-09-04 12:39:51 作者:煙花巷陌裏的那抹笑靨

谁能告诉我如何在Android的自定义日期选取器的宽度和高度?

Can anybody tell me how to customize the date picker's width and height in android?

推荐答案

在布局的 XML 的文件,修改安卓layout_height 的android:layout_width 属性。我目前正在使用承担任何的 FILL_PARENT 或 WRAP_CONTENT 的这些属性的值,但是你可以更具体 - 定义确切的或缩放的像素值。

In your layout's XML file, change the android:layout_height and android:layout_width attributes. I am assuming you are currently using either fill_parent or wrap_content for the values of these attributes, however you can be more specific - defining the exact or scaled pixel value.

例如,机器人:layout_width =15dp将设置宽度为15。一种可扩展的值可以改变15到任何你想要的。如果您想设置一个特定的像素大小,你可以使用,例如, 15px的

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.