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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfButton RotateTo problem when CornerRadius > 0 on Android

Thread ID:

Created:

Updated:

Platform:

Replies:

148471 Oct 21,2019 02:59 PM UTC Nov 12,2019 11:32 AM UTC Xamarin.Forms 6
loading
Tags: SfBorder
Radoslaw Kubas
Asked On October 21, 2019 02:59 PM UTC

Hello,

I noticed in Xamarin.Forms platform Android problem with SfButton and RotateTo. It works fine when CornerRadius=0, but in case it has value, during rotation  button looks like parts of button have different Anchor. On iOS it is fine.

Best regards,
Radek

Hemalatha Marikumar [Syncfusion]
Replied On October 22, 2019 01:38 PM UTC

Hi Radek, 
  
Greetings from Syncfusion, 
  
We have tried to reproduce the reported issue by using the provided details. We are afraid that we are not able to reproduce the issue at our end. Please download the tested sample in below 
  
  
Could you please revert us the sample with reproducing scenario or code snippet that would be helpful to provide a better solution. 
  
Regards, 
Hemalatha M. 


Radoslaw Kubas
Replied On October 23, 2019 04:43 PM UTC

Hello,

Thank you for your sample. I noticed that same problem appears also in your sample, just thing I didn't notice before it happened in simulator but not on real device (at least not on device with Android 9). Please check recording.

Regards,
Radek

Attachment: SfButton.mov_86387e8a.zip

Rachel A [Syncfusion]
Replied On October 25, 2019 07:00 AM UTC

Hi Radoslaw, 
 
We are checking the reported scenario with the provided details, we will update you the status on October 29th, 2019. 
 
Thanks, 
Rachel. 


Lakshmi Radha Krishnan [Syncfusion]
Replied On October 29, 2019 03:55 PM UTC

Hi Radoslaw,

We checked the issue and the reported issue is reproduced in the Android version 7 (Moto G4 plus). So, we are validating the issue with source and we will update you the complete status on October 31, 2019.

Regards,
Lakshmi R.

Lakshmi Radha Krishnan [Syncfusion]
Replied On October 31, 2019 03:51 PM UTC

Hi Radoslaw,


We have confirmed the reported issue is a bug (Text disappear when setting CornerRadius greater than zero in the SfBorder in Android). We will include the fix in our weekly NuGet which is available on 12th November 2019. You can track the bug status from the below link.

 

Feedback: https://www.syncfusion.com/feedback/9851/android-text-disappear-when-setting-cornerradius-is-greater-than-zero-in-the

 

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal link above. We appreciate your patience until then.

 

Regards,

Lakshmi R.


Rachel A [Syncfusion]
Replied On November 12, 2019 11:32 AM UTC

Hi Radoslaw, 
  
Thank you for the patience.  
 
When we further analysed, we found it is a framework level issue when using the RotateTo method along with the CornerRadius (canvas clipping) property. This problem is reproduced on very specific devices. 
  
To overcome this issue, we can set the LayerType as Hardware in the application level itself as per the code snippet shown below. 
  
[C#] 
  
  
public class CustomButtonRenderer : SfBorderRenderer 
{ 
        public CustomButtonRenderer(Context context) : base(context) 
        { 
        } 
  
        protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.View> e) 
        { 
            base.OnElementChanged(e); 
  
            if (Element != null && Element is SfButton) 
            {  
                SfButton button = Element as SfButton; 
  
                if (!button.HasShadow) 
                { 
                    SetLayerType(LayerType.Hardware, new Paint()); 
                } 
            } 
        } 
} 
  
  
We have attached the modified sample, please download it from the following location. 
  
Sample: 
  
Please let us know if you need further clarification on this. 
 
Thanks, 
Rachel. 


CONFIRMATION

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