From 958fb2f07132684ce5ab766714254d6a07da6968 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Thu, 12 Mar 2015 14:55:52 +0200 Subject: [PATCH 1/5] Fixed the disappearing TextField.text. --- ui/editable-text-base/editable-text-base.android.ts | 5 +++++ ui/list-picker/list-picker.android.ts | 2 -- ui/text-field/text-field.android.ts | 6 ++---- ui/text-view/text-view.android.ts | 6 ++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ui/editable-text-base/editable-text-base.android.ts b/ui/editable-text-base/editable-text-base.android.ts index 0f558bf59..338073ce0 100644 --- a/ui/editable-text-base/editable-text-base.android.ts +++ b/ui/editable-text-base/editable-text-base.android.ts @@ -22,6 +22,7 @@ export class EditableTextBase extends common.EditableTextBase { this._imm = this._context.getSystemService(android.content.Context.INPUT_METHOD_SERVICE); this._android = new android.widget.EditText(this._context); + this._configureEditText(); this.android.setTag(this.android.getKeyListener()); var that = new WeakRef(this); @@ -91,6 +92,10 @@ export class EditableTextBase extends common.EditableTextBase { this._android.setOnEditorActionListener(editorActionListener); } + public _configureEditText() { + // abstract + } + public _onDetached(force?: boolean) { this._imm = undefined; this._android = undefined; diff --git a/ui/list-picker/list-picker.android.ts b/ui/list-picker/list-picker.android.ts index 5d2d375b7..9af0b857d 100644 --- a/ui/list-picker/list-picker.android.ts +++ b/ui/list-picker/list-picker.android.ts @@ -56,7 +56,6 @@ export class ListPicker extends common.ListPicker { }, format: function (index: number) { - console.log("format(" + index + ")"); if (this.owner) { return this.owner._getItemAsString(index); } @@ -71,7 +70,6 @@ export class ListPicker extends common.ListPicker { }, onValueChange: function (picker: android.widget.NumberPicker, oldVal: number, newVal: number) { - console.log("onValueChange("+oldVal+", "+newVal+")"); if (this.owner) { this.owner._onPropertyChangedFromNative(common.ListPicker.selectedIndexProperty, newVal); } diff --git a/ui/text-field/text-field.android.ts b/ui/text-field/text-field.android.ts index 7bcf01e54..9aa2959fb 100644 --- a/ui/text-field/text-field.android.ts +++ b/ui/text-field/text-field.android.ts @@ -54,12 +54,10 @@ declare var exports; require("utils/module-merge").merge(common, exports); export class TextField extends common.TextField { - public _createUI() { - super._createUI(); - + public _configureEditText() { + this.android.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_NORMAL | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); this.android.setLines(1); this.android.setMaxLines(1); this.android.setHorizontallyScrolling(true); - this.android.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_NORMAL | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); } } \ No newline at end of file diff --git a/ui/text-view/text-view.android.ts b/ui/text-view/text-view.android.ts index c0ebc0f47..d5aee2464 100644 --- a/ui/text-view/text-view.android.ts +++ b/ui/text-view/text-view.android.ts @@ -5,10 +5,8 @@ declare var exports; require("utils/module-merge").merge(common, exports); export class TextView extends common.TextView { - public _createUI() { - super._createUI(); - + public _configureEditText() { + this.android.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_NORMAL | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE); this.android.setGravity(android.view.Gravity.TOP | android.view.Gravity.LEFT); - this.android.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_FLAG_MULTI_LINE | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); } } \ No newline at end of file From 5144c7b8454dc5598a64164e190dafd095e4bfd2 Mon Sep 17 00:00:00 2001 From: vakrilov Date: Tue, 10 Mar 2015 18:08:17 +0200 Subject: [PATCH 2/5] Resource prefix v.01 --- apps/tests/pages/page14.xml | 14 +++++++---- ui/image/image-common.ts | 48 ++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/apps/tests/pages/page14.xml b/apps/tests/pages/page14.xml index 0ec418851..eef476546 100644 --- a/apps/tests/pages/page14.xml +++ b/apps/tests/pages/page14.xml @@ -1,8 +1,12 @@ -