[TIMOB-7919] Android: UI components: textAlign property and Titanium.UI.TEXT_ALIGNMENT: alignment not respected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-14T14:39:11.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | Android |
Labels | regression |
Reporter | Dustin Hyde |
Assignee | Hieu Pham |
Created | 2012-03-07T14:59:20.000+0000 |
Updated | 2012-03-15T16:32:09.000+0000 |
Description
The textAlign property is not respected in UI components. Regression.
Does not occur in 1.8.2 or iOS. Does not appear to be an expected UI Layout change.
Tested on Button, TextField, and Label.
Steps to Reproduce:
1. Run code.
var textAlign = Ti.UI.TEXT_ALIGNMENT_CENTER;
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var button = Ti.UI.createButton({
top:'80%',
bottom:'5%',
left:'10%',
right:'10%',
title:'This is the button title.',
textAlign:textAlign
});
var textField = Ti.UI.createTextField({
top:'30%',
bottom:'30%',
left:'10%',
right:'10%',
borderWidth:'2',
borderColor:'black',
value:'This is the textField value.',
textAlign:textAlign
});
var label = Ti.UI.createLabel({
text:'This is the label text.',
top:'10%',
bottom:'80%',
left:'10%',
right:'10%',
textAlign:textAlign
});
win.add(label);
win.add(button);
win.add(textField);
win.open();
Expected Result:
Text alignment should be centered for all UI components, as specified in the code.
Actual Result:
Text alignment is not respected. The label and button texts are higher and left-aligned. The textField text is higher.
Attachments
File | Date | Size |
---|---|---|
1.8.2 textAlign correct.png | 2012-03-07T14:59:20.000+0000 | 22185 |
2.0.0 textAlign regression.png | 2012-03-07T14:59:20.000+0000 | 21857 |
Closing as Fixed. SDK: 2.0.0.v20120315140247 Android: V8, Rhino Studio: 2.0.0.201203142055 OS: Snow Leopard Devices Tested: Emulator 2.2, Emulator 2.3.3, Xoom 3.2.1