Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

why switch is not displayed in off mode, while the background is in white color?

$
0
0

set Build > General > Target Framework to "Android 5.0.0 (Lollipop)"?
please help me, I want to display switch in Lollipop version of android. it not displayed properly .

I tried on render like

[assembly: ExportRenderer(typeof(Xamarin.Forms.Switch), typeof(Switch_Render))]
namespace App4.Droid
{
public class Switch_Render: SwitchRenderer
{

   protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Switch> e)
        {
            base.OnElementChanged(e);

            if (Control == null)
            {

                Control.TextOn = "1";
                Control.TextOff = "0";

          }

}
}
}
It is not working
can any help please


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>