{ "id": "62066", "key": "TIMOB-1434", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11226", "name": "Release 1.5.0 M01", "archived": true, "released": true, "releaseDate": "2010-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:10.000+0000", "created": "2011-04-15T02:52:17.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "imageview" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:10.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

See Helpdesk\n32741

\n

If a specific height/width is set on an image, it should scale\nto that size.

\n

Sample failcase is the KitchenSink Views - Image Views - Remote\nImage test, whereby the second graphic when you load the test\nshould be a cloud. instead it looks like this: https://skitch.com/billdawson/ryfin/dock.\nAlso the Image Scaling test, in which you can see that the image is\nnot really scaled up as it should be.

{html}", "attachment": [], "flagged": false, "summary": "Android: Image Doesn't Size with Layout", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "125665", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

This appears to require manually setting the canScale property\non, and then the enableZoomControls property off to keep normal\nbehavior.

\n

It would likely be most consistent to set these properties this\nway by default, providing consistent behavior between\nplatforms.

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:18.000+0000", "updated": "2011-04-15T02:52:18.000+0000" }, { "id": "125666", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I'm reworking image cache and image view. The canScale feature\nwas a hold over from 0.8.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:18.000+0000", "updated": "2011-04-15T02:52:18.000+0000" }, { "id": "125667", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I just want to note here, for my future reference as much as\nanything, that backgroundImage and all its permutations (ie.\nbackground*Image) scale up and down without issue.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:18.000+0000", "updated": "2011-04-15T02:52:18.000+0000" }, { "id": "125668", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Brion's workaround does not work for me. This is my code:

\n
\nvar thisImage = Ti.UI.createImageView({\n    width: 200,\n    height: 200,\n    canScale:true,\n    enableZoomControls:false,\n    image: '/image.png'\n});\n\nwin.add(thisImage);\n
\n

The image is displayed at its original dimensions, which is\n100x100.
\nAs I have stated above, background*Image does work as expected.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:18.000+0000", "updated": "2011-04-15T02:52:18.000+0000" }, { "id": "125669", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Forgot to mention, I am using 1.4.X from 25th October.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:19.000+0000", "updated": "2011-04-15T02:52:19.000+0000" }, { "id": "125670", "author": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

OK, last update :)
\nBrion's workaround works for scaling images down, but not up.

{html}", "updateAuthor": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:19.000+0000", "updated": "2011-04-15T02:52:19.000+0000" }, { "id": "125671", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [69b0d181d7b89d9214c55edf7139ec5265b175c2])\n[#1434] [#1252 state:fixed-in-qa] Introduce new\nTiDrawableReference class which can be used to track the source of\ndrawables as well as fetch their bytes. TiUIImageView changed as\nfirst example of how we might use TiDrawableReference. Fixed\nImageView animation pause/restart bug while digging around in\nTiUIImageView. \nhttps://github.com/appcelerator/titanium_mobile/commit/69b0d181d7b8...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:52:20.000+0000", "updated": "2011-04-15T02:52:20.000+0000" }, { "id": "125672", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [c8fb4db1c72a116aafbc9fbd01f24ea3b87741af])\n[#1434] Fix how TiDrawableReference determines if\npath represents a resource \nhttps://github.com/appcelerator/titanium_mobile/commit/c8fb4db1c72a...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:52:20.000+0000", "updated": "2011-04-15T02:52:20.000+0000" }, { "id": "125673", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [0a21c0a5fcd28a5cf9f2a0e49c7ec64d0ef03df1])\n[#1434] Make KS test case for density-specific\nimages since it didn't exist yet and is relevant with respect to\nnew TiDRawableReference \nhttps://github.com/appcelerator/titanium_mobile/commit/0a21c0a5fcd2...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:52:21.000+0000", "updated": "2011-04-15T02:52:21.000+0000" }, { "id": "125674", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [080d9273c1e155687cfc4cb56405ff9c28363312])\n[#1434 state:fixed-in-qa] TiDrawableReference now\nsupports scaling and sampling, and TiUIImageView now uses it.\nRemove references to \"RA\" from TiUIHelper since we no longer\ngenerate an RA.java. \nhttps://github.com/appcelerator/titanium_mobile/commit/080d9273c1e1...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:52:21.000+0000", "updated": "2011-04-15T02:52:21.000+0000" }, { "id": "125675", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [e21d79a58c7c25df8769fd3477ca87587aa67a14])\nThe android.ui.imageview drillbit test is no longer valid after\n[#1434] because OutOfMemoryError exceptions (from\nimage loading) don't crash the app anymore \nhttps://github.com/appcelerator/titanium_mobile/commit/e21d79a58c7c...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:52:21.000+0000", "updated": "2011-04-15T02:52:21.000+0000" }, { "id": "125676", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

pass regression android 2.1 sim.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:21.000+0000", "updated": "2011-04-15T02:52:21.000+0000" }, { "id": "125677", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

passed regression android 1.6 sim Titanium SDK version: 1.5.0\n(11/22/10 20:42 19a59fd)

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:52:22.000+0000", "updated": "2011-04-15T02:52:22.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }