Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11487] Android: Text of the button spills over to the parent view if its too long

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-01-24T10:05:47.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.2, Release 3.1.0, 2012 Sprint 26 Core, 2012 Sprint 26
ComponentsAndroid
Labelscore, module_button, qe-and100112, qe-testadded
ReporterShyam Bhadauria
AssigneeAllen Yeung
Created2012-10-15T11:47:03.000+0000
Updated2013-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

FileDateSize
ButtonTextSpillingOut.png2012-10-15T11:47:03.000+000032181

Comments

  1. Allen Yeung 2012-12-18

    PR: https://github.com/appcelerator/titanium_mobile/pull/3536
  2. Anshu Mittal 2013-01-18

    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)
  3. Ping Wang 2013-01-18

    reopen to update lables
  4. Vishal Duggal 2013-01-21

    Backport Task TIMOB-12336 Backport PR https://github.com/appcelerator/titanium_mobile/pull/3737
  5. Anshu Mittal 2013-01-24

    Reopening to update labels

JSON Source