[TIMOB-10204] iOS: Button.textAlign does not work with Ti.UI.TEXT_ALIGN_*** constants.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-03-27T08:49:02.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | api, ipass1 |
Reporter | Josh Roesslein |
Assignee | jithinpv |
Created | 2012-07-26T21:05:37.000+0000 |
Updated | 2017-03-20T22:01:44.000+0000 |
Description
When creating a Button and setting the "textAlign" with one of the
TEXT_ALIGN_*** constants the text is not aligned properly.
If you instead use a string value (ex: "right") it seems to work.
Button.textAlign example
var win = Ti.UI.createWindow();
var btn = Ti.UI.createButton({
title: "Click me!",
textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT, // <-- this DOES NOT work
//textAlign: "right", <--- this works
backgroundColor: 'red',
width: 300, height: 50
});
win.add(btn);
win.open();
according to titanium documentation http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.Button-method-setTextAlign it doesn't specified that u have to use "Ti.UI.TEXT_ALIGNMENT_RIGHT" it should used in text field http://docs.appcelerator.com/titanium/2.1/#!/api/Titanium.UI.TextField-property-textAlign so it cannot be treated as a bug. Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as invalid.