Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9098] Android: MaskedText not masked on landscape mode

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-11T00:22:01.000+0000
Affected Version/sRelease 1.7.6, Release 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-10 API
ComponentsAndroid
LabelsSupportTeam, api, module_textfield, qe-testadded
ReporterMauro Parra-Miranda
AssigneeHieu Pham
Created2012-05-10T12:04:22.000+0000
Updated2012-10-12T18:10:25.000+0000

Description

Problem Description

The masked text is not masked when you are in landscape mode (only happening in Google Nexus with Android 4.0).

Expected Result

The text marked just fine.

Actual Results

The text is not marked when in landscape mode (only in device).

Test case

1. Create new mobile Project 2. Add this code to app.js:
var win = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
win.orientationModes=[
Titanium.UI.PORTRAIT,
     Titanium.UI.LANDSCAPE_LEFT,
     Titanium.UI.LANDSCAPE_RIGHT
 ];
var txtfld = Titanium.UI.createTextField({
                color:'#385487',
                right:'3.1%',
                left:'15%',
                borderStyle:Titanium.UI.INPUT_BORDERSTYLE_NONE,
                border:0,
                top:0,
                width:300,
                borderColor: 'transparent',
                backgroundColor: 'transparent',
                font:{fontSize:48,fontFamily:'Helvetica Neue'},
                returnKeyType:Titanium.UI.RETURNKEY_DONE,
                passwordMask:true,
                keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION,
                hintText:'SSN'
            });
         
win.add(txtfld);
 
win.open();
3. Run in Google Nexus with Android 4.0

Extra info

This is working fine on emulator and several devices. This is just failing on Google Nexus with Android 4.0

Attachments

FileDateSize
p51890.124635.1338321493569_SSNnotMasking.jpeg2012-05-29T13:08:16.000+000027926

Comments

  1. Markus Krug 2012-05-14

    The example above works for me when using the latest nightly build (Oct 10 2011 11:48 r074cad38). Unfortunately, it does not work for my use case where I create the text field like this:
       Ti.UI.createTextField({
               className: 'editPasswordTextField',
               value: '',
               passwordMask: true,
               autocorrect: false,
               hintText: 'Password',
               keyboardType: Ti.UI.KEYBOARD_DEFAULT,
               returnKeyType: Ti.UI.RETURNKEY_DONE,
               borderStyle: Ti.UI.INPUT_BORDERSTYLE_NONE,
               autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE
           });
       
    Tested with Samsung Galaxy S2 (GT-I9100, no branding), Android-Version 4.0.3. Built under Mac OS X 10.7.4
  2. Hieu Pham 2012-05-14

    The sample code above describes a different scenario, which affects 2.x phones as well as 4.x. A PR for this should be up momentarily.
  3. Allen Yeung 2012-05-14

    Merged second PR for this issue: https://github.com/appcelerator/titanium_mobile/pull/2182
  4. Vishal Duggal 2012-05-17

    PR https://github.com/appcelerator/titanium_mobile/pull/2209 merged for master
  5. Vishal Duggal 2012-05-17

    PR https://github.com/appcelerator/titanium_mobile/pull/2189 merged for 2_0_X
  6. Natalie Huynh 2012-05-18

    Tested with 2.0.2.v20120518140206 on Nexus S 4.0.4
  7. Mauro Parra-Miranda 2012-05-29

    This is an example of how is not masking the text
  8. Hieu Pham 2012-05-29

    The fix was merged on May 17th. I tested on latest master and 2.0.X on 4.0.4 device and it works fine. Resolving bug.
  9. Smitha Guduru 2012-06-23

    The text is masked in landscape mode and portrait mode on Device: Nexus S(4.0.4) Titanium Studio, build: 2.2.0.201206222035 Titanium SDK: 2.1.0.v20120622174154
  10. Shyam Bhadauria 2012-07-11

    Re-opening to edit label

JSON Source