The TimePicker's default mode is clock, and the attribute can just be set in the android layout xml or when it be created by calling the construction method. So you can't set it with the Muai Handler.
But you can use the android style to change the TimePicker's default mode.
Create the style.xml under the /Platform/Android/Resource/values
folder:
<resources>
<style name="Spinner" parent="android:Widget.Material.Light.TimePicker">
<item name="android:timePickerMode">spinner</item>
</style>
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:timePickerStyle">@style/Spinner</item>
</style>
<style name="Splash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@android:color/holo_blue_dark</item>
<item name="android:windowSplashScreenIconBackgroundColor">#000000</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/logo</item>
<item name="windowSplashScreenAnimationDuration">300</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
</resources>
In the AndroidManifest.xml:
<application android:allowBackup="true" android:theme="@style/Splash" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
Add the package named AndroidX.Core.SplashScreen
in your android part.
Delete the (Theme="@style/Maui.SplashTheme")
in the MainActivity and add the following code in the its OnCreate method's first line:
AndroidX.Core.SplashScreen.SplashScreen.InstallSplashScreen(this);
I have done a sample to test. The splash screen doesn't work when I set the item in the Maui.SplashTheme. So I declare another Theme for the application. But when I use the other control, the splash screen doesn't work.
So you can try to use the solution above or Just use the following code and set AppTheme
as the MainActivity's theme. And then create a splash screen follwing the xamarin.android splash screen.
<resources>
<style name="Spinner" parent="android:Widget.Material.Light.TimePicker">
<item name="android:timePickerMode">spinner</item>
</style>
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:timePickerStyle">@style/Spinner</item>
</style>
</resources>