How to customize date picker's width and height in android

后端 未结 3 524
[愿得一人]
[愿得一人] 2020-12-09 10:04

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

3条回答
  •  死守一世寂寞
    2020-12-09 10:20

    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.

    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.

提交回复
热议问题