Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the TimePicker smaller

Is it possible to make the default TimePicker smaller in the activity xml? I have searched this but so far only found out how to create a custom time picker which I do not want to do, or create a popup window which I also don't want to have to do. Has anyone tried this with any success? My TimePicker is sitting in a tableRow in a scrollView. Cheers

like image 870
WillNZ Avatar asked Aug 07 '12 00:08

WillNZ


People also ask

How do I make my DatePicker smaller?

The android:scaleX="0.7" is what shrinked the visible picker (it works for DatePicker and TimePicker ) and the android:layout_marginLeft="-30dp" allowed for the space to be reduced.

How can I change DatePicker size in android?

@Andrew When you add android:scaleX="0.60" and android:scaleY="0.60" , it will reduce the size of picker to 60% of actual size, So remaining 40% will look like empty white border around the picker.


1 Answers

You can do this. I had also same problem. But Google helped me. You have to just change your XML file.

android:scaleY="0.90" & android:scaleX="0.90"

It will small your picker with percentage value which you provide.

Works only from API 11.

like image 166
Sanjay Bhimani Avatar answered Oct 20 '22 16:10

Sanjay Bhimani