From 8a35098a5557c19c07c1c5cb8458264ccddd420a Mon Sep 17 00:00:00 2001 From: Nedyalko Nikolov Date: Tue, 1 Sep 2015 08:48:34 +0300 Subject: [PATCH] Fix for issue #640. --- ui/editable-text-base/editable-text-base.android.ts | 8 ++++---- ui/text-field/text-field.android.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/editable-text-base/editable-text-base.android.ts b/ui/editable-text-base/editable-text-base.android.ts index 40c45c298..184615b60 100644 --- a/ui/editable-text-base/editable-text-base.android.ts +++ b/ui/editable-text-base/editable-text-base.android.ts @@ -205,20 +205,20 @@ export class EditableTextBase extends common.EditableTextBase { } var inputType = editableTextBase.android.getInputType(); - inputType = inputType & ~28762; //28762 (0x00007000) 13,14,15bits + inputType = inputType & ~28672; //28672 (0x00070000) 13,14,15bits (111 0000 0000 0000) switch (data.newValue) { case enums.AutocapitalizationType.none: //Do nothing, we have lowered the three bits above. break; case enums.AutocapitalizationType.words: - inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_WORDS; //8192 (0x00002000) 14th bit + inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_WORDS; //8192 (0x00020000) 14th bit break; case enums.AutocapitalizationType.sentences: - inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; //16384(0x00004000) 15th bit + inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; //16384(0x00040000) 15th bit break; case enums.AutocapitalizationType.allCharacters: - inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; //4096 (0x00001000) 13th bit + inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; //4096 (0x00010000) 13th bit break; default: inputType = inputType | android.text.InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; diff --git a/ui/text-field/text-field.android.ts b/ui/text-field/text-field.android.ts index 8dac6fb1c..e1c482c93 100644 --- a/ui/text-field/text-field.android.ts +++ b/ui/text-field/text-field.android.ts @@ -23,7 +23,7 @@ function onSecurePropertyChanged(data: dependencyObservable.PropertyChangeData) } // Lower all autocapitalization bits, because password bits don't like them and we will receive "Unsupported input type: 16513" error for example. - newInputType = newInputType & ~28762; //28762 (0x00007000) 13,14,15bits + newInputType = newInputType & ~28672; //28672 (0x0070000) 13,14,15 bits (111 0000 0000 0000) } else { if (currentClass === android.text.InputType.TYPE_CLASS_TEXT) {