Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23334] Windows: Ti.UI.TextField textAlign does not affect hintText

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionNot Our Bug
Resolution Date2016-06-07T15:12:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterJonas Bjurhult
AssigneeGary Mathews
Created2016-04-28T18:12:10.000+0000
Updated2017-03-24T18:54:36.000+0000

Description

The hinttext is always aligned to the left SDK 5.4.0.v20160426000033

Comments

  1. Nazmus Salahin 2016-05-02

    Hello, I am able to reproduce this issue. Ti.UI.TextField textAlign does not affect hintText on Windows Phone but on Android it works as expected. *Steps:* 1. Create a default classic project. 2. Replace app.js code with following.
       var win = Ti.UI.createWindow({
       	backgroundColor : 'white'
       });
       
       var textField = Ti.UI.createTextField({
       	borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
       	color : '#336699',
       	top : 10,
       	left : 10,
       	width : 250,
       	height : 60,
       	hintText : "HINT",
       	textAlign : Titanium.UI.TEXT_ALIGNMENT_RIGHT
       });
       
       win.add(textField);
       win.open(); 
       
    3. Build and run the app on Windows Phone device. >> It is seen that hint text is aligned to left. 4. Write something on the test field. >> It is seen that text is aligned to right as it should be. Thanks *Environment*: *Device info:* Nexus7 (android 6.0.1) , Microsoft Lumia640 (Windows Phone 8.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
  2. Christopher Williams 2016-05-09

    I think this may actually be a limitation/bug in Windows itself. We set the TextAlignment property or else the normal text would align as you defined. It may just be that Windows ignore the alignment for it's PlaceholderText property...
  3. Gary Mathews 2016-06-06

    Yes, this is a limitation of Windows; PlaceholderText ignores the TextAlignment property. There doesn't seem to be a workaround either.
  4. Christopher Williams 2016-06-07

    Unfortunately this appears to be a limitation of Windows OS.
  5. Lee Morris 2017-03-24

    Closing ticket with reference to the previous comments.

JSON Source