66using Android . Content ;
77using Android . Text ;
88using Android . Views ;
9- using Android . Views . InputMethods ;
109using Android . Widget ;
1110using AndroidX . AppCompat . Widget ;
1211using Microsoft . Maui . Controls . Internals ;
1312using static Android . Views . ViewGroup ;
14- using static Android . Widget . TextView ;
1513using AButton = Android . Widget . Button ;
1614using AppCompatActivity = AndroidX . AppCompat . App . AppCompatActivity ;
1715using AppCompatAlertDialog = AndroidX . AppCompat . App . AlertDialog ;
@@ -277,10 +275,8 @@ void OnPromptRequested(IView sender, PromptArguments arguments)
277275 if ( arguments . Keyboard == Keyboard . Numeric )
278276 editText . KeyListener = LocalizedDigitsKeyListener . Create ( editText . InputType ) ;
279277
280- editText . EditorAction += OnEditorAction ;
281-
282278 if ( arguments . MaxLength > - 1 )
283- editText . SetFilters ( [ new InputFilterLengthFilter ( arguments . MaxLength ) ] ) ;
279+ editText . SetFilters ( new IInputFilter [ ] { new InputFilterLengthFilter ( arguments . MaxLength ) } ) ;
284280
285281 frameLayout . AddView ( editText ) ;
286282 alertDialog . SetView ( frameLayout ) ;
@@ -292,21 +288,6 @@ void OnPromptRequested(IView sender, PromptArguments arguments)
292288 alertDialog . Window . SetSoftInputMode ( SoftInput . StateVisible ) ;
293289 alertDialog . Show ( ) ;
294290 editText . RequestFocus ( ) ;
295-
296- void OnEditorAction ( object sender , EditorActionEventArgs e )
297- {
298- if ( sender is not AppCompatEditText editText )
299- {
300- return ;
301- }
302-
303- editText . EditorAction -= OnEditorAction ;
304-
305- if ( e . ActionId == ImeAction . Done )
306- {
307- alertDialog . GetButton ( ( int ) DialogButtonType . Positive ) ? . PerformClick ( ) ;
308- }
309- }
310291 }
311292
312293 void UpdateProgressBarVisibility ( bool isBusy )
0 commit comments