Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1348] textField keyboard types & states

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:56.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M07
ComponentsAndroid
Labelsandroid, defect, release-1.6.0, textfield
ReporterDasher
AssigneeDon Thorp
Created2011-04-15T02:50:03.000+0000
Updated2011-04-17T01:55:56.000+0000

Description

textField on android (TiUIText) needs revisiting - currently the keyboard type (and some states) set the inputType in handleKeyboardType - which covers most use cases and is a reliable way of ensuring that you get a consistent text field and the associated keyboard (& passwordMask).

However if you build the textField by setting properties or want a complex mix of properties; ie you'd like auto-completion on a passwordField - then you're likely to have issues.

When setting individual properties - you'll need to use the rawInputType flags and to query the textView for it's current properties. Then either use one of the Android input masks or work out which attributes are mutually exclusive.

Comments

  1. Don Thorp 2011-04-15

    Additional test was that password mask could not be set with the phone keypad.

  2. Don Thorp 2011-04-15

    (from [ed4d837742bd613b434d83507e7133a4277b9629]) [#1348 state:fixed-in-qa] [#1730 state:fixed-in-qa] Rewrote the keyboard setup routine to take all modifiers and selectors into consideration when initializing and changing. Add a custom key handler to allow numbers and a set of punctuation chars, when the keyboard was numbers_and_punctuation http://github.com/appcelerator/titanium_mobile/commit/ed4d837742bd613b434d83507e7133a4277b9629"> http://github.com/appcelerator/titanium_mobile/commit/ed4d837742bd6...

  3. Thomas Huelbert 2011-04-15

    Titanium.UI.KEYBOARD_URL + password mask resulted in no mask or url keyboard.

  4. Bill Dawson 2011-04-15

    Test case app.js for QA (also see KS Controls - Text field - Keyboard test, though that one does not have the URL-with-password mask test since it's kinda illogical).

    This test is also in Bugtests now.

       Titanium.UI.setBackgroundColor('#000');
       var win = Titanium.UI.createWindow({  
           title:'Test',
           backgroundColor:'#000',
           exitOnClose: true
       });
       win.add(
           Ti.UI.createTextField({
               left: 0, right: 0, height: 40, top: 0,
               keyboardType: Ti.UI.KEYBOARD_URL,
               hintText: 'url (shld have slash & "go")'
       }));
       win.add(
           Ti.UI.createTextField({
               left: 0, right: 0, height: 40, top: 50,
               keyboardType: Ti.UI.KEYBOARD_EMAIL,
               hintText: 'email (shld have @ sign)'
       }));
       win.add(
           Ti.UI.createTextField({
               left: 0, right: 0, height: 40, top: 100,
               keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD,
               hintText: 'number pad'
       }));
       win.add(
           Ti.UI.createTextField({
               left: 0, right: 0, height: 40, top: 150,
               keyboardType: Ti.UI.KEYBOARD_PHONE_PAD,
               hintText: 'phone pad'
       }));
       win.add(
           Ti.UI.createTextField({
               left: 0, right: 0, height: 40, top: 200,
               keyboardType: Ti.UI.KEYBOARD_URL,
               passwordMask: true,
               hintText: 'url with pwd mask'
       }));
       
       win.add(
           Ti.UI.createLabel({
               left: 5, right: 5, bottom: 5, height: 'auto',
               text: "Make sure the keyboard that appears for each field has the characteristics described in the field's hint text.",
               color: 'white'
       }));
       
       win.open();
       
  5. Bill Dawson 2011-04-15

    (from [ce71ef899c89d78c8a0c4ebfd5946cc86469fe7a]) [#1348 state:fixed-in-qa] Use setTransformationMethod for setting password masks, so as to avoid TYPE_TEXT_VARIATION_xxx mixtures https://github.com/appcelerator/titanium_mobile/commit/ce71ef899c89d78c8a0c4ebfd5946cc86469fe7a"> https://github.com/appcelerator/titanium_mobile/commit/ce71ef899c89...

  6. Opie Cyrus 2011-04-15

    verified emulator 2.2

JSON Source