Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-7260

Android: TextField hintText's font is different in passwordMask field than normal field

    Details

    • Sprint:
      2014 Sprint 09 Tooling

      Description

      The Problem:

      The font of the hintText of a text field changes if the field is a "password field" or if it's a normal field.

      Code sample in app.js

      var win =  Ti.UI.createWindow({
      	backgroundColor:'black'
      });
       
      var username = Ti.UI.createTextField({
      	top:10,
      	left:20,right:20,height:40,
      	backgroundColor:'white',
      	
      	hintText:'hintText for username'
      });
       
      var password = Ti.UI.createTextField({
      	top:100,
      	left:20,right:20,height:40,
      	backgroundColor:'white',
      	
      	passwordMask:true,
      	hintText:'hintText for password'
      });
       
       
      win.add(username);
      win.add(password);
       
      win.open();
      

      Discussion

      As you can see from this example, the only different between the two textFields is the passwordMask. When the application is ran, you'll see that the font is different to the point that one of the texts is longer than the other.

      Workaround

      Setting the fontFamily on a password field doesn't seem to do anything, but setting it on the normal field does work properly. A workaround for now is to set the font family in the normal field as monospace:

      var foo =  Ti.UI.createTextField({
      	top:10,
      	left:20,right:20,height:40,
      	backgroundColor:'white',
       
      	font:{
      		fontFamily:'monospace'
      	},
      	
      	hintText:'hintText for username'
      });
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                penrique Pedro Enrique (Inactive)
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-11789
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code