[TIMOB-5176] Android images in imageview won't scale without explicit width and height
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-09-26T15:18:12.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | Sprint 2011-38, Release 1.8.0 |
Components | Android |
Labels | imageview, merged-v8, parity, scale, stage |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-08-30T13:44:02.000+0000 |
Updated | 2011-10-31T22:37:24.000+0000 |
Description
Given the attached large photo "julia.jpg" and this app.js:
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#000',
exitOnClose: true
});
var v = Ti.UI.createView({
top: "33%", height: "33%", left: "33%", right: "33%",
backgroundColor: "blue"
});
var img = Ti.UI.createImageView({image: "julia.jpg"});
v.add(img);
win.add(v);
win.open();
Our iOS implementation will scale that graphic to make it fit and look good in the ImageView. Our Android implementation won't scale it at all but rather just show part of the center of the image.
Attachments
File | Date | Size |
---|---|---|
julia.jpg | 2011-08-30T13:46:44.000+0000 | 739261 |
Turns out this was basically part of TIMOB-5177. Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/485
test, review, merge.
Closing. Fix verified on Nexus One 2.2.2 with SDK 1.8.0.v20111013161411