[TIMOB-1434] Android: Image Doesn't Size with Layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:56:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M01 |
Components | Android |
Labels | android, defect, imageview |
Reporter | Don Thorp |
Assignee | Marshall Culpepper |
Created | 2011-04-15T02:52:17.000+0000 |
Updated | 2011-04-17T01:56:10.000+0000 |
Description
See http://developer.appcelerator.com/helpdesk/view/32741">Helpdesk 32741
If a specific height/width is set on an image, it should scale to that size.
Sample failcase is the KitchenSink Views - Image Views - Remote Image test, whereby the second graphic when you load the test should be a cloud. instead it looks like this: https://skitch.com/billdawson/ryfin/dock">https://skitch.com/billdawson/ryfin/dock. Also the Image Scaling test, in which you can see that the image is not really scaled up as it should be.
This appears to require manually setting the canScale property on, and then the enableZoomControls property off to keep normal behavior.
It would likely be most consistent to set these properties this way by default, providing consistent behavior between platforms.
I'm reworking image cache and image view. The canScale feature was a hold over from 0.8.
I just want to note here, for my future reference as much as anything, that backgroundImage and all its permutations (ie. background*Image) scale up and down without issue.
Brion's workaround does not work for me. This is my code:
The image is displayed at its original dimensions, which is 100x100.
As I have stated above, background*Image does work as expected.
Forgot to mention, I am using 1.4.X from 25th October.
OK, last update :)
Brion's workaround works for scaling images down, but not up.
(from [69b0d181d7b89d9214c55edf7139ec5265b175c2]) [#1434] [#1252 state:fixed-in-qa] Introduce new TiDrawableReference class which can be used to track the source of drawables as well as fetch their bytes. TiUIImageView changed as first example of how we might use TiDrawableReference. Fixed ImageView animation pause/restart bug while digging around in TiUIImageView. https://github.com/appcelerator/titanium_mobile/commit/69b0d181d7b89d9214c55edf7139ec5265b175c2"> https://github.com/appcelerator/titanium_mobile/commit/69b0d181d7b8...
(from [c8fb4db1c72a116aafbc9fbd01f24ea3b87741af]) [#1434] Fix how TiDrawableReference determines if path represents a resource https://github.com/appcelerator/titanium_mobile/commit/c8fb4db1c72a116aafbc9fbd01f24ea3b87741af"> https://github.com/appcelerator/titanium_mobile/commit/c8fb4db1c72a...
(from [0a21c0a5fcd28a5cf9f2a0e49c7ec64d0ef03df1]) [#1434] Make KS test case for density-specific images since it didn't exist yet and is relevant with respect to new TiDRawableReference https://github.com/appcelerator/titanium_mobile/commit/0a21c0a5fcd28a5cf9f2a0e49c7ec64d0ef03df1"> https://github.com/appcelerator/titanium_mobile/commit/0a21c0a5fcd2...
(from [080d9273c1e155687cfc4cb56405ff9c28363312]) [#1434 state:fixed-in-qa] TiDrawableReference now supports scaling and sampling, and TiUIImageView now uses it. Remove references to "RA" from TiUIHelper since we no longer generate an RA.java. https://github.com/appcelerator/titanium_mobile/commit/080d9273c1e155687cfc4cb56405ff9c28363312"> https://github.com/appcelerator/titanium_mobile/commit/080d9273c1e1...
(from [e21d79a58c7c25df8769fd3477ca87587aa67a14]) The android.ui.imageview drillbit test is no longer valid after [#1434] because OutOfMemoryError exceptions (from image loading) don't crash the app anymore https://github.com/appcelerator/titanium_mobile/commit/e21d79a58c7c25df8769fd3477ca87587aa67a14"> https://github.com/appcelerator/titanium_mobile/commit/e21d79a58c7c...
pass regression android 2.1 sim.
passed regression android 1.6 sim Titanium SDK version: 1.5.0 (11/22/10 20:42 19a59fd)