How to change size of a numberpicker Android

Jefferson picture Jefferson · Jan 31, 2015 · Viewed 14.7k times · Source

I'm trying to decrease the size of an Android numberpicker, but already tried several things and I could not. I did not find a responsible attribute the change in size. Wanted to do the following:

enter image description here

Must decrease because I have to put the numberpicker on a screen with lots of information. Any help will be appreciated.

Answer

Shah picture Shah · Jun 25, 2016

I was facing a similar problem, I wanted to increase the text size of the NumberPicker but couldn't find a way to do it as part of the Widget. In my research I found the following solution:

<NumberPicker
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:scaleX="0.75"
    android:scaleY="0.75"/>

Think of scaleX and scaleY as a magnifying factor. Values < 1 will shrink the Widget, 1 will have no change, and > 1 will increase its size.