[TIMOB-9112] MobileWeb: TEXT_VERTICAL_ALIGNMENT_BOTTOM not working on buttons
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-15T15:08:25.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 MW |
Components | MobileWeb |
Labels | layout, parity |
Reporter | Carl Orthlieb |
Assignee | Bryan Hughes |
Created | 2012-05-11T15:06:56.000+0000 |
Updated | 2012-08-01T16:23:22.000+0000 |
Description
1. Create a button with a label with vertical alignment of TEXT_VERTICAL_ALIGNMENT_BOTTOM.
var button = Ti.UI.createButton({
x: 0, y: 0, width: 200, height: 400,
backgroundColor: 'red',
title: "Chris and Bryan Rock!",
color: 'white',
textAlign: TEXT_ALIGNMENT_CENTER,
verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM
});
EXPECTED RESULTS: Matches the look/feel of Android, which also supports this property (see screenshot below).
ACTUAL RESULTS: The text is centered on the button.
Attachments
Can you attach some code for the screenshot shown? The code you posted works perfectly fine (see attached screenshot), after changing x and y to left and top (there is no x or y property) and changing TEXT_ALIGNMENT_CENTER to Ti.UI.TEXT_ALIGNMENT_CENTER.
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2411
Tested On: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120731184111 Android 4.0.4 - default ,chrome 18.0 Iphone 5.0.1 - safari mobile Mac osx - chrome 21,safari 5.1.4,firefox 14.0.1