[AC-416] ListView with a set of image templates, crashing the app
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2015-11-05T09:43:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | android |
Reporter | Peter Ladis |
Assignee | Shak Hossain |
Created | 2015-08-22T01:38:37.000+0000 |
Updated | 2015-11-05T09:43:37.000+0000 |
Description
The exact same code works without issue on IOS...however on android we eventually run out to memory. I am using scaled down images to try and alleviate the issue but its the same. Any issues on how to solve this
We have a feed sort of like Facebook. Please advise
Hello [~peterladis], We tested your issue in our environment. Its working as expected. Can you Please attach your test code,logs & let us know. *Test Environments:* CLI Version = 4.0.1 Titanium SDK Version = 4.1.0.GA Android: Google Galaxy Nexus - 4.1.1 - API 16 - 720x1280 Appc Studio: Appcelerator Studio, build: 4.1.0.201507140915 Device: Nexus 7,Android Version:5.1.1 *Test Code:* app.js
Thanks
Here is my template: FeedService.prototype.messagetemplateImage = function(){ var myTemplate = { bindId: 'parentview', properties: {height: 0, selectedBackgroundColor:$Class.MainBackground, backgroundColor:$Class.MainBackground }, childTemplates: [ { type: 'Ti.UI.View', // Use an image view for the image bindId: 'messageview', properties: { selectedBackgroundColor:$Class.PrimaryColor, right:5, left:5, height: 0, borderRadius:4, backgroundColor:$Class.White, borderColor:$Class.DarkGrey, borderWidth:1 }, childTemplates: [ ///Main Child Tempplates { type: 'Ti.UI.View', // Use an image view for the image bindId: 'authorView', // Maps to a custom pic property of the item data properties: { // Sets the image view properties height:'60', top:0 }, childTemplates: [ //Author View { type: 'Ti.UI.ImageView', // Use a label for the title bindId: 'author_image', // Maps to a custom title property of the item data properties: { // Sets the label properties height:40, width:40, left: 10, backgroundImage:$Class.Avatar, borderRadius:4 } }, authorLabel(), authorTime(), { // Title type: 'Ti.UI.Button', // Use a label for the title bindId: 'edit_carrot', // Maps to a custom title property of the item data properties: { // Sets the label properties right:0, top:0, width:35, heigth:35, opacity:.4, backgroundImage:$Class.CaretDown, visible:false, zIndex:20, feeditem:'', parentWindow:'' }, events:{ click:editHandler } } ] }, { type: 'Ti.UI.View', // Use an image view for the image bindId: 'mainContentView', // Maps to a custom pic property of the item data properties: { // Sets the image view properties top:60, bottom:likeBarH }, childTemplates: [ { type: 'Ti.UI.Label', // IOS: TiStyledlabelLabel bindId: 'content_text', // Maps to a custom title property of the item data properties: { // Sets the label properties left:15, right:15, height: Ti.UI.SIZE || 'auto', scrollable:false, autoLink:Titanium.UI.AUTOLINK_URLS, editable:false, zIndex:25, color : $Class.LightBlack, top:0 }, events:{ click:commentsEvent }, { type: 'Ti.UI.View', // Use an image view for the image bindId: 'content_image_view', // Maps to a custom pic property of the item data properties: { // Sets the image view properties backgroundColor:'transparent', }, childTemplates: [ { type: 'Ti.UI.ScrollableView', bindId: 'content_image', properties: { showPagingControl:false, pagingControlColor:'transparent', pagingControlHeight:0, width:'95%' } }, { type: 'Ti.UI.View', // Use an image view for the image bindId: 'content_image_panel', // Maps to a custom pic property of the item data properties: { // Sets the image view properties backgroundColor:'transparent', zIndex:20 } //, //events:{ //click:commentsEvent //} } ] }; ] }, { type: 'Ti.UI.View', // Use an image view for the image bindId: 'likeBarView', // Maps to a custom pic property of the item data properties: { // Sets the image view properties height:likeBarH, bottom:0 }, childTemplates: [ ContentMainLikeTemplate() ] } ] } ]}; return myTemplate;
FYI..al my images are remote URL that are sized 240 by 240
Here is a copy of my console log...I even took out the code that loads the image and STILL get an process memory issue...it happens when i scroll down to the 200 element..and then scroll back up Appcelerator Command-Line Interface, version 4.1.2 Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved. TRACE | __command__ search paths: [ "/Users/pladis/.appcelerator/install/4.1.2/package", "/Users/pladis/.appcelerator/install/4.1.2/package/node_modules", "/Applications/Appcelerator Studio/AppceleratorStudio.app/Contents/MacOS/node_modules", "/Applications/Appcelerator Studio/AppceleratorStudio.app/Contents/node_modules", "/Applications/Appcelerator Studio/AppceleratorStudio.app/node_modules", "/Applications/Appcelerator Studio/node_modules", "/Applications/node_modules", "/node_modules", "/Users/pladis/.appcelerator/.npm/lib/node_modules" ] DEBUG | [PLUGIN-LOAD] 0ms /Users/pladis/.appcelerator/install/4.1.2/package/appc.js DEBUG | [PLUGIN-LOAD] 359ms /Users/pladis/.appcelerator/install/4.1.2/package/node_modules/appc-cli-titanium/appc.js DEBUG | [PLUGIN-LOAD] 0ms /Users/pladis/.appcelerator/install/4.1.2/package/node_modules/arrow/appc.js log level set to "trace" executing command "run" set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"} checking credentials for existing session Attempting to load session info from config file check if session is invalidated session expiry 1440339381696 false Arrow Cloud config file: /Users/pladis/.acs found Arrow Cloud login { mid: '87522c48aa9ee8f7962f5617cd32a7828d13f42d', publishPort: 443, publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com', username: 'peter@lilypadsolutions.com', cookie: [ 'connect.sid=s%3Apft4bf0CvjKsNQdVz9a11liK.lTVWC%2FFc5IBLE6wt81Q0%2FbQd7lKLUzg73ve8hXIVtvk; Path=/; Expires=Sun, 23 Aug 2015 14:16:25 GMT; HttpOnly' ], defaultEP: { publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com', publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com Arrow Cloud cookie expiry [ 1440339385000 ] session already loaded in opts.session getCredentials() session: { "ipaddress": "10.54.150.249", "username": "peter@lilypadsolutions.com", "password": "
Hello [~peterladis], We tested your issue in our environment. Its working as expected. We use remote images for listview display( width-240,Height-240). *Testing Environment:* Device: Nexus 7 CLI Version:4.0.1 Titanium SDK Version:4.1.0.GA Android: Google Galaxy Nexus : 4.1.1 - API 16 - 720x1280 Appc Studio: Appcelerator Studio, build: 4.1.0.201507140915 alloy:1.7.3 Test Code: *index.tss*
*index.js*
*index.xml*
Thanks