Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9112] MobileWeb: TEXT_VERTICAL_ALIGNMENT_BOTTOM not working on buttons

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-15T15:08:25.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 MW
ComponentsMobileWeb
Labelslayout, parity
ReporterCarl Orthlieb
AssigneeBryan Hughes
Created2012-05-11T15:06:56.000+0000
Updated2012-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

FileDateSize
Screen Shot 2012-05-11 at 2.19.12 PM.png2012-05-11T15:06:56.000+000064997
Screen Shot 2012-05-11 at 2.51.24 PM.png2012-05-11T15:06:56.000+000065157
Working sample.jpg2012-05-24T18:16:08.000+000022239

Comments

  1. Bryan Hughes 2012-05-24

    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.
  2. Bryan Hughes 2012-06-15

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2411
  3. Lokesh Choudhary 2012-08-01

    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

JSON Source