[TIMOB-17984] TextArea set to FILL not wrapping correctly inside a horizontal layout with another sibling
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-22T23:59:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0 |
Components | Android |
Labels | TextArea, layout, size, ui, ui.view, wrap |
Reporter | Tim Kelly |
Assignee | Joshua Quick |
Created | 2014-11-05T17:34:55.000+0000 |
Updated | 2017-08-22T23:59:23.000+0000 |
Description
Create a view with horizontal layout. Make two siblings (a view, or anything else), and a TextArea set to FILL.
Enter an amount of text into the TextArea that it must wrap but would not have wrapped if the other sibling wasn't there.
The text correctly wraps but the TextArea itself does not adjust height.
This is a different symptom but may be related to TC-4810.
See example below (tried this on an HTC One, for screen size reference):
<Alloy>
<Window class="container" id="skin" layout="vertical">
<View layout="vertical" height="Ti.UI.FILL" width="Ti.UI.FILL">
<View height="Ti.UI.SIZE" width="Ti.UI.FILL" layout="horizontal">
<View height="10dp" width="100dp" backgroundColor="red" />
<TextArea value="Test that won't adjust its height." width="Ti.UI.FILL" backgroundColor="blue" height="Ti.UI.SIZE"/>
</View>
<View height="Ti.UI.SIZE" width="Ti.UI.FILL" layout="horizontal">
<View height="10dp" width="100dp" backgroundColor="red" />
<TextArea value="Test that will adjust height. Would have wrapped." width="Ti.UI.FILL" backgroundColor="blue" height="Ti.UI.SIZE"/>
</View>
</View>
</Window>
</Alloy>
Attachments
File | Date | Size |
---|---|---|
Screenshot_2014-11-05-12-25-40.png | 2014-11-05T17:34:55.000+0000 | 78602 |
Problem can be reproduced on: Titanium SDK 3.4.0 Samsung Galaxy Nexus Android 4.2.2 Here is a simple test code:
N.B. If I change the textArea value longer, like "abcdefghijklmnopqrstuvwxvzabcdefghijklmnopqrstuvwxvz", the wrapping works well.
Passed FR. PR merged. Changes are seen in SDK versions: 6.2.0.v20170822113609 7.0.0.v20170822142802