Xamarin.Forms Switch Control does not appear on Android until an input control is selected

I have a registration form that looks something like this:

<StackLayout>
    <StackLayout 
        HorizontalOptions="FillAndExpand" 
        Padding="{x:Static local:Styles.LabelBeforeEntryPadding}">
        <Label 
            Text="{Binding LabelPasswort2}" 
            HorizontalOptions="{x:Static local:Styles.LabelHorizontalOptions}" 
            TextColor="{x:Static local:Styles.RegistrationPageTextColor}" />
    </StackLayout>
    <custom:StrypeEntry 
        Text="{Binding Passwort2}" 
        IsPassword="true" 
        IsEnabled="{Binding ControlsEnabled}" 
        HorizontalOptions="FillAndExpand" />
</StackLayout>
<!--Newsletter-->
<StackLayout 
    Orientation="Horizontal" 
    HorizontalOptions="StartAndExpand">
    <Switch 
        IsToggled="{Binding Newsletter}" 
        IsEnabled="{Binding ControlsEnabled}" 
        VerticalOptions="StartAndExpand" 
        HorizontalOptions="StartAndExpand"  />
    <Label 
        Text="{Binding LabelNewsletter}" 
        VerticalOptions="CenterAndExpand" 
        HorizontalOptions="Start" 
        TextColor="{x:Static local:Styles.RegistrationPageTextColor}" />
</StackLayout>
<!--Datenschutz-->
<StackLayout 
    Orientation="Horizontal" 
    HorizontalOptions="StartAndExpand">
    <custom:StrypeSwitch 
        IsToggled="{Binding Privacy}" 
        IsEnabled="{Binding ControlsEnabled}" 
        VerticalOptions="StartAndExpand" 
        HorizontalOptions="StartAndExpand" />
    <Label 
        Text="{Binding LabelPrivacy}" 
        VerticalOptions="CenterAndExpand" 
        HorizontalOptions="Start" 
        WidthRequest="300" TextColor="{x:Static local:Styles.RegistrationPageTextColor}" />
</StackLayout>

The problem is that the switches are not visible when the form is displayed, they become visible only when the recording is concentrated.

StrypeEntry is just a custom record with Border Corder and support for Capitalize, nothing out of the ordinary, and for the switch, I made a Custom Renderer to fix the problem of not showing up.

I already tried the fix for ButtonText Alignment, which did not help ( Xamarin.Forms: incorrect alignment of button text after a click (Android) )

I also tried this

public override void ChildDrawableStateChanged(View child)
{
    base.ChildDrawableStateChanged(child);

    Control.Text = Control.Text;
    Control.Checked = Control.Checked;
}

but still no fix

(I am testing the GT-I9505 with Android 4.4.2. The version of Xamarin.Forms Assemblies is 1.2.2.0)

, ,

+4
3

, .

, Height WidthRequest xaml

, - . , , , .

~

+8

, SelectedIndex 0 ( ) .

0

, Android 4.4 . lollipop .

-1

All Articles