Set ImeOptions to Done on Android Editor (#5653)
* Set ImeOptions to Done on Android Editor * Apply fix to Material Editor renderer - fixes #4832 - fixes #5030
This commit is contained in:
Родитель
20de7b5fbe
Коммит
08c6bdf2dd
|
@ -2,6 +2,7 @@
|
|||
using Android.Content;
|
||||
using Android.Util;
|
||||
using Android.Views;
|
||||
using Android.Views.InputMethods;
|
||||
using Android.Widget;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Material.Android;
|
||||
|
@ -26,6 +27,7 @@ namespace Xamarin.Forms.Material.Android
|
|||
var view = inflater.Inflate(Resource.Layout.TextInputLayoutFilledBox, null);
|
||||
_textInputLayout = (MaterialFormsTextInputLayout)view;
|
||||
_textInputEditText = _textInputLayout.FindViewById<MaterialFormsEditText>(Resource.Id.materialformsedittext);
|
||||
_textInputEditText.ImeOptions = ImeAction.Done;
|
||||
UpdatePlaceholderText();
|
||||
|
||||
return _textInputLayout;
|
||||
|
|
|
@ -10,6 +10,7 @@ using Android.Util;
|
|||
using Android.Views;
|
||||
using Java.Lang;
|
||||
using Android.Widget;
|
||||
using Android.Views.InputMethods;
|
||||
|
||||
namespace Xamarin.Forms.Platform.Android
|
||||
{
|
||||
|
@ -31,7 +32,10 @@ namespace Xamarin.Forms.Platform.Android
|
|||
|
||||
protected override FormsEditText CreateNativeControl()
|
||||
{
|
||||
return new FormsEditText(Context);
|
||||
return new FormsEditText(Context)
|
||||
{
|
||||
ImeOptions = ImeAction.Done
|
||||
};
|
||||
}
|
||||
|
||||
protected override EditText EditText => Control;
|
||||
|
|
Загрузка…
Ссылка в новой задаче