From 2f43a6356393d0aae07b240ea8c48b0fa2c9e381 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 23 Apr 2015 09:56:52 +0300 Subject: [PATCH] Fixed: TextField and TextView do not show the soft keyboard when their focus() method is called. #309 --- ui/editable-text-base/editable-text-base.android.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/editable-text-base/editable-text-base.android.ts b/ui/editable-text-base/editable-text-base.android.ts index 338073ce0..543287f84 100644 --- a/ui/editable-text-base/editable-text-base.android.ts +++ b/ui/editable-text-base/editable-text-base.android.ts @@ -109,6 +109,17 @@ export class EditableTextBase extends common.EditableTextBase { } } + public focus(): boolean { + var result = super.focus(); + + if (result && this.android) { + this._imm.showSoftInput(this.android, android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT); + } + + return result; + } + + public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) { if (this._android) { this.android.setText(data.newValue + "", android.widget.TextView.BufferType.EDITABLE);