[TIMOB-8782] Android: Ti.UI.TextArea doesn't render properly on some devices
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-04-24T11:31:51.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | Parity, SupportTeam, api |
Reporter | Junaid Younus |
Assignee | Hieu Pham |
Created | 2012-04-18T14:05:37.000+0000 |
Updated | 2017-03-13T18:10:42.000+0000 |
Description
*Code*
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var textArea = Ti.UI.createTextArea({
value : 'I am a textarea',
height : 40,
width : 300,
top : 60,
borderWidth : 2,
borderColor : '#bbb',
borderRadius : 5
});
win.addEventListener('click', function(e)
{
textArea.blur();
});
win.add(textArea);
win.open();
*Expected behavior*
Ti.UI.TextArea should render, without being 'squished'.
*Actual behavior*
As you can see, it's actually squished on a HTC Sensation 4G.
*Notes*
-Was able to reproduce this issue on a HTC Sensation 4G. I also tried it with an ASUS Eee Pad, but I wasn't able to reproduce the issue, it renders fine.
-Works fine on the iOS simulator.
-Screenshot of issue: http://www.abload.de/img/keyboardissuewqjo0.png
This might be a code error: should height be Ti.UI.SIZE? The HTC Sensation 4G is 960 x 540 and the ASUS Eee Pad is 1280 x 800. The text looks CLIPPED not SQUISHED.
Do we have screen shots of the screens? Also, has anyone tested this against another HTC phone that may be using HTC Sense? If HTC Sense changes the default font size, then that could explain things.
The problem in the client's app is, that it sometimes randomly shows the TextArea like in the screenshot above. However, as soon as you type out a character, it automatically expands and returns to normal, meaning it shows the clipped/squished TextArea like it's supposed to, as soon as the user types something in. The sample code above is the closes I could do, in order to reproduce this issue.
I worked with Hieu on this problem and we managed to figure out that it actually was a problem with the app code. It was being clipped because of the parent view trying to resize its content incorrectly. This ticket can be closed and marked as invalid.
Closing ticket as invalid.
Closing ticket as invalid.