I want to hide emojis and auto suggestions from keyboard programmatically. Its working in some Android devices but not in all devices. here\'s my code for hide auto suggesti
For Android
mEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD| TEXT_MULTILINE);
TYPE_TEXT_VARIATION_VISIBLE_PASSWORD - We use Password char as Text input for EditTest. It doesn't have emojis and email keys like .com and @ keys TEXT_MULTILINE - This will change the keyboard layout button [Done] or [->] to [Enter] key so we can use multi line text or new line feature.
In Xamarin Form
Create a CustomRender and in OnElementChanged method
protected override void OnElementChanged(ElementChangedEventArgs e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.ImeOptions = Android.Views.InputMethods.ImeAction.Done;
Control.InputType = Android.Text.InputTypes.ClassText | Android.Text.InputTypes.TextVariationVisiblePassword| Android.Text.InputTypes.TextFlagMultiLine;
Control.SetTypeface(Typeface.Default, TypefaceStyle.Normal);
}
}