SfComboBox Android keyboard Next button

I am trying to change the keyboard on Android for the SfComboBox when the IsEditableMode = True.  The keyboard currently displays with the "Next" button in the lower right hand corner and when clicked will go to a random field.  I want to change the "Next" to be "Done" and just close the keyboard when clicked.  I currently have a custom renderer with this line of code:

Control.GetAutoEditText().ImeOptions = (Android.Views.InputMethods.ImeAction)Android.Views.InputMethods.ImeFlags.NoFullscreen;                Control.GetAutoEditText().SetImeActionLabel("Done", Android.Views.InputMethods.ImeAction.Done);

When I run the code it makes no changes to the keyboard.  It still says "Next".  How can I change this button?

3 Replies 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team September 10, 2020 06:11 AM UTC

Hi Derek,

Greetings from Syncfusion.

We have analyzed your requirement. We have prepared the sample using ImeOptions based on your requirement.

Code Snippet 
        protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.XForms.ComboBox.SfComboBox> e) 
        { 
            base.OnElementChanged(e); 
            if (Control != null) 
            { 
                Control.GetAutoEditText().ImeOptions = (Android.Views.InputMethods.ImeAction)Android.Views.InputMethods.ImeFlags.NoFullscreen; 
                Control.GetAutoEditText().ImeOptions = Android.Views.InputMethods.ImeAction.Done; 
                Control.GetAutoEditText().SetImeActionLabel("Done", Android.Views.InputMethods.ImeAction.Done); 
            } 
        } 

Please have the following sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBoxDone_Sample-1996983551

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Marked as answer

DH Derek Hagen replied to Suganya Sethuraman September 10, 2020 01:42 PM UTC

Hi Derek,

Greetings from Syncfusion.

We have analyzed your requirement. We have prepared the sample using ImeOptions based on your requirement.

Code Snippet 
        protected override void OnElementChanged(ElementChangedEventArgs<Syncfusion.XForms.ComboBox.SfComboBox> e) 
        { 
            base.OnElementChanged(e); 
            if (Control != null) 
            { 
                Control.GetAutoEditText().ImeOptions = (Android.Views.InputMethods.ImeAction)Android.Views.InputMethods.ImeFlags.NoFullscreen; 
                Control.GetAutoEditText().ImeOptions = Android.Views.InputMethods.ImeAction.Done; 
                Control.GetAutoEditText().SetImeActionLabel("Done", Android.Views.InputMethods.ImeAction.Done); 
            } 
        } 

Please have the following sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBoxDone_Sample-1996983551

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.
 


Thanks.  That gave me the right direction.  I needed to modify your code to be this instead:

Control.GetAutoEditText().ImeOptions = (Android.Views.InputMethods.ImeAction)Android.Views.InputMethods.ImeFlags.NoFullscreen | Android.Views.InputMethods.ImeAction.Done;
Control.GetAutoEditText().SetImeActionLabel("Done", Android.Views.InputMethods.ImeAction.Done);

With the above I needed to have the NoFullscreen option and Done button.




SS Suganya Sethuraman Syncfusion Team September 11, 2020 07:42 AM UTC

Hi Derek,

Thanks for the update.

We are glad the issue has been resolved at your end, and please get back to us if you need any further assistance.
 
Regards,
Suganya S
 


Loader.
Up arrow icon