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
close icon

SfButton RotateTo problem when CornerRadius > 0 on Android

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

6 Replies

HM Hemalatha Marikumar Syncfusion Team 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. 



RK Radoslaw Kubas 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


RA Rachel A Syncfusion Team 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. 



LR Lakshmi Radha Krishnan Syncfusion Team 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.


LR Lakshmi Radha Krishnan Syncfusion Team 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.



RA Rachel A Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon