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

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

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

3条回答
  •  Happy的楠姐
    2020-12-09 10:30

    For DatePicker and TimePicker:

    1. android:scaleX="0.60" and android:scaleY="0.60"
      Above code will set the visible part of the Date and Time Picker to something like 60% of the total space and

    2. android:layout_marginLeft="-50dp", android:layout_marginTop="-30dp", android:layout_marginRight="-50dp", android:layout_marginBottom="-30dp"
      Above code will remove extra spaces around this picker

      padding="-40dp" doesn't worked for me so I have used margin.

      
      
      
      

提交回复
热议问题