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

How to resolve the issue with decimal point and minus key on Samsung devices in SfNumericUpDown

Platform: Xamarin.Forms |
Control: SfNumericUpDown |
Published Date: May 15, 2019 |
Last Revised Date: May 16, 2019

When using virtual numeric keyboard in SfNumericUpDown, decimal point and minus sign will be missing on some of the Samsung devices.

To resolve this issue, follow the below steps:

  1. Create a custom SfNumericUpDown by inheriting the SfNumericUpDown class.
  2. Likewise create a CustomNumericUpDownRenderer class by inheriting SfNumericUpDownRenderer.

 

Code of Custom Renderer in Android:

[assembly: ExportRenderer(typeof(CustomNumericUpDown), typeof(CustomNumericUpDownRenderer))]
namespace Samsung_issue.Droid
{
 public class CustomNumericUpDownRenderer : SfNumericUpDownRenderer
 {
  protected override void OnElementChanged(ElementChangedEventArgs<SfNumericUpDown> e)
  {
   base.OnElementChanged(e);
 
   if (Control != null)
   {
    for (int i = 0; i < Control.ChildCount; i++)
    {
     var child = Control.GetChildAt(i);
     if (child is EditText)
     {
      var control = child as EditText;
      control.InputType = InputTypes.ClassPhone;
     }
    }
 
   }
 
  }
 }
}
 

 

Output:

Image represent the decimal point and minus key missing issue on Samsung devices in SfNumericUpDown.

 

 

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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