How to customize the NumberPicker

Mageek picture Mageek · Sep 24, 2013 · Viewed 9.8k times · Source

I found 2 built-in NumberPickers:


(source: techbooster.org)

By default, it's the first one, but when I add android:theme="@android:style/Theme.NoTitleBar" in AndroidManifest.xml, it becomes the second one.

How can I put this line (I need it) and still get the first NumberPicker?

Answer

Bryan Herbst picture Bryan Herbst · Sep 24, 2013

The problem is that @android:style/Theme is the Android theme for devices on API version 10 (2.3) and lower.

If you want to keep Holo support, you should use @android:style/Theme.Holo.

If you need to support devices without Holo as well, you will need to create asset folders for those devices and specify the theme there.