Saturday 15 February 2014

Xamarin.Forms Switch Control is not Visible on Android prior to selecting an Entry Control -



Xamarin.Forms Switch Control is not Visible on Android prior to selecting an Entry Control -

i have registration form looks 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 switches not visible when displaying form, become visible when entry focused.

the strypeentry customized entry border corder , prop capitalize, nil fancy , switch made custom renderer prepare issue of not displaying.

i tried prepare buttontext alignment did not help (xamarin.forms: wrong button text alignment after click (android))

i tried this

public override void childdrawablestatechanged(view child) { base.childdrawablestatechanged(child); control.text = control.text; control.checked = control.checked; }

but still no fix

(i'm testing on gt-i9505 android 4.4.2. version of xamarin.forms assemblies 1.2.2.0)

please help me, give thanks you

seems have reply own question.

i fixed issue adding height- , widthrequest switch in xaml

hope helps else. , maybe if find improve solution, please allow me know.

greetings~

android xamarin.forms

No comments:

Post a Comment