[TIMOB-11487] Android: Text of the button spills over to the parent view if its too long
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-24T10:05:47.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.2, Release 3.1.0, 2012 Sprint 26 Core, 2012 Sprint 26 |
Components | Android |
Labels | core, module_button, qe-and100112, qe-testadded |
Reporter | Shyam Bhadauria |
Assignee | Allen Yeung |
Created | 2012-10-15T11:47:03.000+0000 |
Updated | 2013-01-24T10:05:47.000+0000 |
Description
This is not a regression. It exists as far as 2.0.1.
Steps to reproduce:
1. Use the code below in app.js
var win = Ti.UI.createWindow();
win.backgroundColor = 'white';
var label = Ti.UI.createLabel({
text: 'Buttons should auto size to text, but stay within red',
top: 20,
left: 10,
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
color: 'black'
});
var outlineView3 = Ti.UI.createView({
height: 62,
width: 152,
top: 280,
backgroundColor: 'red'
});
var view3 = Ti.UI.createView({
height: 60,
width: 150
});
var button3 = Ti.UI.createButton({
title: 'VeryLongButtonText1234567890 '
});
view3.add(button3);
outlineView3.add(view3);
win.add(label);
win.add(outlineView3);
win.open();
2. Run the app
Expected result:
1. The text of the button should be contained within the button. It should not spill over the parent view.
Actual result:
1. The button text spills over to the parent view. It view is attached with bug.
Attachments
File | Date | Size |
---|---|---|
ButtonTextSpillingOut.png | 2012-10-15T11:47:03.000+0000 | 32181 |
PR: https://github.com/appcelerator/titanium_mobile/pull/3536
Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: Samsung Galaxy nexus(v 4.0.2), LG-p970(v 2.2.2)
reopen to update lables
Backport Task TIMOB-12336 Backport PR https://github.com/appcelerator/titanium_mobile/pull/3737
Reopening to update labels