private void UpdateContent() { KeyboardHelper.HideKeyboard(this); // Remove previous content base.RemoveAllViews(); if (ViewModel?.Content != null) { // Create and set new content var view = ViewModelToViewConverter.Convert(this, ViewModel.Content); base.AddView(view); } else if (ViewModel != null) { var splashView = ViewModelToViewConverter.GetSplash(this, ViewModel); if (splashView != null) { base.AddView(splashView); } } ContentChanged?.Invoke(this, new EventArgs()); }
private void ViewOnFocusChange(object sender, View.FocusChangeEventArgs focusChangeEventArgs) { if (focusChangeEventArgs.HasFocus) { KeyboardHelper.HideKeyboard(sender as View); } }
public bool OnEditorAction(TextView v, ImeAction actionId, KeyEvent e) { if (actionId == ImeAction.Done || (actionId == ImeAction.ImeNull && e.KeyCode == Keycode.Enter)) { this.Element.InvokeSendCompleted(); this.Control.ClearFocus(); KeyboardHelper.HideKeyboard(v); } return(true); }
private void Popups_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { KeyboardHelper.HideKeyboard(this); InitializePopups(); }