[TIMOB-13331] Android: Sometimes imageView doesn't occupy all of parent view when there is more than one imageView in the window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.0.2, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Sam Cleaver |
Assignee | Unknown |
Created | 2012-10-17T13:58:32.000+0000 |
Updated | 2018-02-28T20:03:56.000+0000 |
Description
If there is more than one imageView in a window and both are set to height 100%. Sometimes they will not occupy 100% of their respective parent views.
*Workarounds:* Use a webview (hit on performance)
*Reproducibility:* 9 / 10 (its either one or the other or both not occupying 100% height)
*Annoyability:* 10 / 10
*Test Code:*
var win = Titanium.UI.createWindow({
title : 'Tab 1',
backgroundColor : 'green'
});
//Either one of these boxes will not render correctly
var topbox = Ti.UI.createView({
/* left & right work too */
top : '1%',
height : '32%',
width : '100%',
backgroundColor : 'black'
});
var topimage = Ti.UI.createImageView({
image : 'http://beaver6813.com/dev/jira/codestrong-2.jpg',
width : '100%',
height : '100%',
top : 0,
left : 0
});
var botbox = Ti.UI.createView({
/* left & right work too */
bottom : '1%',
height : '32%',
width : '100%',
backgroundColor : 'black'
});
var botimage = Ti.UI.createImageView({
image : 'http://beaver6813.com/dev/jira/codestrong-2.jpg',
width : '100%',
height : '100%',
top : 0,
left : 0
});
botbox.add(botimage);
win.add(botbox);
topbox.add(topimage);
win.add(topbox);
win.open();
Attachments
File | Date | Size |
---|---|---|
device-2012-10-17-145817.png | 2012-10-17T13:58:32.000+0000 | 401916 |
Reproduced with Ti SDK 3.0.2 GA, Samsung Galaxy S3 Android 4.0.4 Bug doesn't occur with Samsung Galaxy S2 Android 2.3.6, so it's a device-specific issue.
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Android Emulator: Android SDK version: 2.2