Fixed: TextField and TextView do not show the soft keyboard when their focus() method is called. #309

This commit is contained in:
Rossen Hristov
2015-04-23 09:56:52 +03:00
parent aad02aa789
commit 2f43a63563

View File

@@ -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) { public _onTextPropertyChanged(data: dependencyObservable.PropertyChangeData) {
if (this._android) { if (this._android) {
this.android.setText(data.newValue + "", android.widget.TextView.BufferType.EDITABLE); this.android.setText(data.newValue + "", android.widget.TextView.BufferType.EDITABLE);