We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to create custom renderer for SfButton on Android?

Thread ID:





151198 Feb 3,2020 02:20 PM UTC Feb 7,2020 03:46 AM UTC Xamarin.Forms 2
Tags: SfButton
Radoslaw Kubas
Asked On February 3, 2020 02:20 PM UTC


I need to  create custom renderer on Android and iOS for SfButton. Can you give me the name of the class I need to inherit from on Android?

On iOs I used Syncfusion.XForms.iOS.Buttons.SfButtonRenderer but can't find equivalent on Android.

Best regards,

Radoslaw Kubas
Replied On February 3, 2020 03:37 PM UTC

Hello again, I have one update to the question.

After some tests I noticed that Syncfusion.XForms.Android.Border.SfBorderRenderer do the job, is it correct?

And with it I noticed another problem, I just wanted to override OnElementChange

protected override void OnElementChanged(ElementChangedEventArgs<View> e)

            if (Control != null)
                Control.Touch += Control_Touch;

but it seems that Control is null. How can I subscribe this event other way? Or I just need execute something like this in platform code soo there way will be perfect to:

private void Control_Touch(object sender, TouchEventArgs e)
            if (e.Event.Action == MotionEventActions.Down)

            e.Handled = false;

Thank you in advance for your help.


Lavanya Anaimuthu [Syncfusion]
Replied On February 7, 2020 03:46 AM UTC

Hi Radoslaw Kubas, 
Greetings from Syncfusion. 
We have validated your query and would like to let you know that, currently we did not set the native control in our implementation.  
Limitation:  We failed to get the native control on custom renderer since control implementation from Syncfusion Border, all other customization happens through drawing. Currently we are checking other possible ways to achieve the same and we will update the status of Android on February 11,2020.   
We appreciate your patience until then. 
Lavanya A. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon