Creating timepickerdialog using custom styles in Android

I want to create a dialogfragment or dialog with TimePicker, as shown in the figure below. The problem is that my application is using the holo.light theme, and from there, I am customizing it, but I can't find anything related to TimePicker

Can I assign custom styles to TimePicker? I can't find anything in the official Android documentation

The following image is what I've got so far, but TimePicker still doesn't have the color I want (it's the same as orange in the separator of the title). I have it even in XML, as shown below:

<TimePicker
        android:id="@+id/picker"
        style="@style/@R_502_1036@"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dip" />

Do you have any ideas? Thank you very much in advance

resolvent:

I use holoeverywhere https://github.com/Prototik/HoloEverywhere It has native holo elements in Android 2.2 and later. If you use this library, you can easily set the style of selector, because it is open source and you can fully access the code

Maybe you don't need the whole library. It might be good to just get the TimePicker element (beware of dependency hell)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>