public void Next(bool up) { Stage stage = Stage; if (stage == null) { return; } Vector2 stageCoords = Parent.LocalToStageCoordinates(new Vector2(X, Y)); TextField textField = FindNextTextField(stage.Actors, null, Vector2.Zero, stageCoords, up); if (textField == null) { if (up) { stageCoords = new Vector2(float.MinValue, float.MinValue); } else { stageCoords = new Vector2(float.MaxValue, float.MaxValue); } textField = FindNextTextField(Stage.Actors, null, Vector2.Zero, stageCoords, up); } if (textField != null) { stage.SetKeyboardFocus(textField); } else { OnscreenKeyboard.Show(false); } }
protected override void OnTouchDown(TouchEventArgs e) { do { if (e.Pointer == 0 && e.Button != 0) { break; } if (IsDisabled) { e.Handled = true; break; } Vector2 position = e.GetPosition(this); ClearSelection(); SetCursorPosition(position.X); _selectionStart = _cursor; Stage stage = Stage; if (stage != null) { stage.SetKeyboardFocus(this); } OnscreenKeyboard.Show(true); //e.Handled = true; } while (false); base.OnTouchDown(e); }