Adrian Tandrau
Adrian Tandrau

Reputation: 11

Use Theme.Light Datepicker on Theme.Holo.Light

I have an activity that uses Theme.Holo.Light containing EditText, RadioButtons and DatePicker. I want to use Theme.Holo.Light for entire activity, except DatePicker which I want to be Theme.Light style. How can I do this?

Upvotes: 0

Views: 11098

Answers (1)

gian1200
gian1200

Reputation: 3864

Have you tried something like

<DatePicker
    ...
    style="@android:style/Widget.DatePicker"/>

?

Holo uses @android:style/Widget.Holo.DatePicker while @android:style/Widget.DatePicker is the one you need to use.

Links:

Style list

Style list's source code

Update:

It seems that DatePicker is built with 3 NumberPickers. My answer is correct, but it is incomplete. The best approach I found to solve your problem was to recreate ans make your own DatePicker (copypaste from source code) and give style to the DatePicker AND the 3 NumberPickers inside.

Link of the Layout on GitHub:

DatePicker Layout

Upvotes: 5

Related Questions