Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20195] Windows: The textAlign and verticalAlign property of the label is not working on windows phone

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-01-14T16:10:19.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sRelease 5.3.0
ComponentsWindows
Labelsqe-5.3.0
ReporterKai Lu
AssigneeKota Iguchi
Created2016-01-05T02:45:22.000+0000
Updated2016-04-26T22:39:57.000+0000

Description

On windows phone the textAlign property of a label is always set to left no matter what I set it, the same for the verticalAlign always default to the top. The only way I could make the label text center is to set both its width and height as Ti.UI.SIZE and the label should be centered to the parent view and hence the text. Only a workaround but it's not very convenient because sometimes I would like to change the backgroundColor of the label from the click event but now it only changes the background of size of the text rather than the whole parent view. The bug exists on the latest Ti SDK 5.1.1

Comments

  1. Kota Iguchi 2016-01-12

    [~kenjorai] Could you paste a simple sample code that reproduce the issue? I can see now that text align does not work well with Ti.UI.FILL and "defined" sizes, but just wanted to make sure to clarify what issue you have been seeing exactly.
  2. Harry Bryant 2016-04-26

    Verified as fixed, textAlign & verticalAlign properties of a label now work correctly on windows phone. Tested on: Windows 10 Pro Windows Phone 10.0 (Microsoft Lumia 640 LTE) Appc Studio: 4.6.0.201604081249 Ti SDK: 5.3.0.v20160421080259 Appc NPM: 4.2.5-3 Appc Core: 5.3.0-34 Node: v4.4.2 *Closing Ticket.*

JSON Source