There is android platform specific attached property ImeOption for entry control.
<Entry x:Name="Default" FontSize="22" Placeholder="Default" Keyboard="Numeric" android:Entry.ImeOptions="Next" />
Please provide an option to use this property for Telerik MAUI RadEntry.
<VerticalStackLayout>
<telerik:RadEntry x:Name="entry" Loaded="entry_Loaded" />
</VerticalStackLayout>
private void entry_Loaded(object sender, EventArgs e)
{
var textInput = ChildOfType<RadTextInput>(this.entry);
if (textInput != null)
{
var handler = textInput.Handler;
if (handler == null)
{
textInput.HandlerChanged += this.OnTextInputHandlerChanged;
}
else
{
this.UpdateNativeElement(handler);
}
}
}
private void OnTextInputHandlerChanged(object sender, EventArgs e)
{
var textInput = (RadTextInput)sender;
this.UpdateNativeElement(textInput.Handler);
textInput.HandlerChanged -= this.OnTextInputHandlerChanged;
}
private void UpdateNativeElement(IViewHandler handler)
{
var nativeEntry = handler.PlatformView as Telerik.Maui.Platform.RadMauiTextInput;
if (nativeEntry != null)
{
#if ANDROID
nativeEntry.ImeOptions = Android.Views.InputMethods.ImeAction.None;
#endif
}
}
internal static T ChildOfType<T>(View visualElement) where T : View
{
if (visualElement == null)
{
return null;
}
foreach (var item in VisualTreeElementExtensions.GetVisualTreeDescendants(visualElement))
{
if (item is T targetElement)
{
return targetElement;
}
}
return null;
}Subscribe to the HandlerChanged:
<telerik:RadEntry x:Name="telerikEntry" HandlerChanged="TelerikEntry_HandlerChanged"/>And set the ImeOptions to the native element:
private void TelerikEntry_HandlerChanged(object sender, EventArgs e)
{
var nativeEntry = this.telerikEntry.Handler.PlatformView as Telerik.Maui.Platform.RadMauiEntry;
if (nativeEntry != null)
{
nativeEntry.EditText.ImeOptions = Android.Views.InputMethods.ImeAction.None;
}
}
Regards,
Didi
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.