[TIMOB-3548] Android: textArea in an alertDialog not visible if width is a percent
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-05-03T14:00:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-16 |
Components | Android |
Labels | android, defect, klist, release-1.7.0, reported-1.6.1 |
Reporter | Jon Alter |
Assignee | Bill Dawson |
Created | 2011-04-15T03:46:31.000+0000 |
Updated | 2011-05-03T14:00:52.000+0000 |
Description
A textArea in an alertDialog will not display until after you change orientation if the width is set to a percent. Will display fine if the width is static or not set.
Step 1: create a mobile project
Step 2: paste the example into your app.js
Step 3: launch the app on a android 1.6 device
Step 4: click the button
Step 5: notice that the alertDialog does not have a textArea in
it
Step 6: change the orientation of the device
Step 7: notice that the textArea appears
Step 8: repeat the above steps but change the width:'90%' to
width:120
Step 9: notice that textArea appears
Step 10: repeat the above steps on a non-1.6 device, and notice the
textArea displaying when using a % for the width
var win = Ti.UI.createWindow({
backgroundColor: 'yellow'
});
var view = Ti.UI.createView({
backgroundColor: 'green'
});
var dialog = Titanium.UI.createAlertDialog({
buttonNames : ['Save', 'Cancel'],
title : 'Edit task name',
androidView : view
});
var taskNameArea = Titanium.UI.createTextArea({
width: '90%',
// width: 120
});
view.add(taskNameArea);
var button = Ti.UI.createButton({
title: 'click',
height: 50,
width: 100,
top: 20
});
button.addEventListener('click', function(e){
dialog.show();
});
win.add(button);
win.open();
Tested On
Display textArea
Nexus S 2.3.2 TiSDK 1.6.1
Emulator APIs 2.2 Screen HVGA TiSDK 1.6.1
Droid 2.2.1 TiSDK 1.6.1
Does Not display textArea until after orientation change
Emulator APIs 1.6 Screen QVGA TiSDK 1.6.1
Emulator APIs 1.6 Screen HVGA TiSDK 1.6.1
G1 1.6 TiSDK 1.6.1
No comments