Make DatePicker and TimePicker smaller

前端 未结 6 1194
无人及你
无人及你 2020-12-17 10:30

Is there any way to make smaller DatePicker and TimePicker (but to be visible all parts ) in Android ? I tried to set layout_width=\"130dp\" but then DatePicker isn\'t visib

6条回答
  •  情歌与酒
    2020-12-17 10:52

    You can simple scale like this:

    android:scaleY="0.5" android:scaleX="0.5"

    to get the half of the size.

    And to get a smaller padding, android:padding="-20dp"

    Looking from the framework the picker may overlap other views, but in the app, it will not.

    The padding is going to work perfectly and the buttons also.

提交回复
热议问题