[TIMOB-13545] Android: ImageView: Remote image with "@" character doesn't display
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-02-24T21:06:03.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | 2013 Sprint 08 API, 2013 Sprint 08, Release 4.0.0 |
Components | Android |
Labels | android, image, imageview, qe-testadded, regression, remoteURL |
Reporter | Martin Guillon |
Assignee | Hieu Pham |
Created | 2013-04-12T13:01:44.000+0000 |
Updated | 2015-03-11T22:35:30.000+0000 |
Description
*Problem description*
If you set an image with a "@" in the path, the image won't be loaded. This is because getCleanUri thinking it's a domain address. Therefore the test on the hash will return false. So the image is downloaded but not drawn.
*Repro notes*
Paste the @2x URL in the browser to verify the URL is valid.
Uncomment cd-mini-graphic image to verify it working for standard images.
Only the URL with @2x doesn't work.
Works on iOS, not on Android.
*Test case*
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var image = Ti.UI.createImageView({
bottom : 0,
width : 200,
height : 200,
backgroundColor : 'red',
image : 'http://dl.dropboxusercontent.com/u/255893/appcelerator@2x.png'
//image : 'http://www.appcelerator.com.s3.amazonaws.com/web/home/platform/cd-mini-graphic.png'
});
win.add(image);
win.open();
Tested and confirmed with Samsung Galaxy S2 Android 2.3.6, Ti SDK 3.1 CI.
Confirmed as regression between 2.1.4 GA and 3.0.2 GA.
PR: https://github.com/appcelerator/titanium_mobile/pull/4161
3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4195
Image is displayed. Working as expected. Verified on: Tested on: Device: Samsung Galaxy Note, Android version: 2.3.6 SDK: 3.1.1.v20130502180055 CLI version : 3.1.0 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201305020752 XCode : 4.5.1
Reopening the issue as it's not working as expected. The image is not loaded when the URL is containing the @2x symbol. The load event didn't get fire. Verified with below Environment with mentioned URL:- http://dl.dropboxusercontent.com/u/255893/appcelerator@2x.png Tested on: 1. Mac OSX Yosemite 10.10 2. Appcelerator Studio, build: 3.4.1.201410281743 3. Titanium SDK, build: 3.4.1.v20141028145715 4. Titanium CLI, build: 3.4.1-dev 5. Alloy: 1.5.1 6.S Galaxy S5 with Android 4.4.2 / Nexus 4.2 with Android 4.2.1 7. Android 5.0 API 21 and Android SDK Build-Tools 20 For Regression testing, I have verified the issue with Ti SDK 3.4.0.GA and Ti SDK 3.3.0.GA. The link didn't work with this Ti SDK too.So can't mark it as Regression.
Added load event code with the above test code.
Verified fixed using: Titanium SDK 4.0.0.v20150311105810 Studio 4.0.0.201503062102 CLI 3.4.2 Xcode 6.2 Node 0.10.36 On: Galaxy Note 2, Android 4.3 Correctly displayed remote image with '@' in title.