RadTimeSpanPicker Background Color for Android is Black

1 Answer 14 Views
DateTimePicker TimeSpanPicker
Hakob
Top achievements
Rank 1
Hakob asked on 12 Feb 2024, 08:29 AM | edited on 12 Feb 2024, 08:32 AM
hello, please can you help me fix the background color issue for the Android
Style can't help me fix the issue.
Hakob
Top achievements
Rank 1
commented on 12 Feb 2024, 08:57 AM

I found the issue, it is  dark-mode problem

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 12 Feb 2024, 10:17 AM

Hello Hakob,

If you set the theme to dark, then the colors change by default. You can set different color to the popup background by using the PopupViewStyle for Popup mode and  DropDownViewStyle for DropDown mode:

    <ContentPage.Resources>
        <ResourceDictionary>
            <Style TargetType="telerik:PickerPopupContentView" x:Key="popupViewStyle">
                <Setter Property="BackgroundColor" Value="{AppThemeBinding Light=White, Dark=LightBlue}"/>
                <Setter Property="WidthRequest" Value="270"/>
            </Style>

            <Style TargetType="telerik:PickerDropDownContentView" x:Key="dropDownStyle">
                <Setter Property="BackgroundColor" Value="{AppThemeBinding Light=White, Dark=LightBlue}"/>
                <Setter Property="WidthRequest" Value="270"/>
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>
    <VerticalStackLayout>
        <telerik:RadTimeSpanPicker BorderColor="#8660C5" PickerMode="DropDown"
                           IsClearButtonVisible="True"
                           IsToggleButtonVisible="True"
                           AutomationId="timeSpanPicker">
            <telerik:RadTimeSpanPicker.DropDownSettings>
                <telerik:PickerDropDownSettings DropDownViewStyle="{StaticResource dropDownStyle}"/>
            </telerik:RadTimeSpanPicker.DropDownSettings>
            <telerik:RadTimeSpanPicker.PopupSettings>
                <telerik:PickerPopupSettings PopupViewStyle="{StaticResource popupViewStyle}"/>
            </telerik:RadTimeSpanPicker.PopupSettings>
        </telerik:RadTimeSpanPicker>
    </VerticalStackLayout>

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DateTimePicker TimeSpanPicker
Asked by
Hakob
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or