Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Using Completed event for "ImeAction.Search"

$
0
0

I've successfully created a custom renderer "SearchEntry" to enable the "Search" button on the keyboard for this entry.
I'm also using the Completed event on the entry. On iOS this event gets fired, but not on Android.
When I look into the code of the EntryRenderer on Android, the Completed will not be fired when the ImeAction is "Search", see:

bool TextView.IOnEditorActionListener.OnEditorAction (TextView v, ImeAction actionId, KeyEvent e)
{
    if (actionId == ImeAction.Done || (actionId == ImeAction.ImeNull && e.KeyCode == Keycode.Enter)) {
        base.Control.ClearFocus ();
        v.HideKeyboard (false);
        base.Element.SendCompleted ();
    }
    return true;
}

Is there a way to also make sure the Completed event gets fired when using the Search ImeAction?

Thanks!


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>