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

How to create custom renderer for SfButton on Android?


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,

2 Replies

RK Radoslaw Kubas February 3, 2020 10:37 AM

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.


LA Lavanya Anaimuthu Syncfusion Team February 6, 2020 10:46 PM

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. 

Live Chat Icon For mobile
Up arrow icon