Skip to main content

image won"t show in tableView



I'm creating a tableView in appcelerator (Android) and I want to add an image to it. This is just a test because I also had some problems with it in my project and I wanted to try it out first somewhere else so I wouldn't ruin my whole project.





I first added the standard png's to see if he would show those, and he did. But when I add a png that I've created, he refuses to show it in the tableView. Does someone know why he refuses to show the image? (I created that png in photoshop by changing one of the standard png's and adding my image to it.)







var win = Titanium.UI.createWindow({

title:'tableViewRow',

backgroundColor:'#fff'

});



var regData = [

{leftImage:'KS_nav_ui.png', title:'gft', left:20, color:'black'},

{rightImage:'KS_nav_views.png', title:'grofvuil', left:20, color:'black'},

{leftImage:'glas.png', title:'glas', left:20, color:'black'}

];



var tbl = Titanium.UI.createTableView({

data:regData

});



win.add(tbl);

win.open();







Here's an image of the result I get in my android emulator (android api: Google APIs Android 2.2 and screen:HVGA) enter image description here


Comments

  1. If you are using AppC 1.8, you may just need a forward slash in your path '/'. (or backward if Windows)

    ReplyDelete
  2. I've solved it. What I did is I ran the application in an android amulator. I closed the app and went back to the homescreen (where you can save some apps). I pressed on menu and went to the settings. Than I went to applications. I opened 'manage applications' and remove the application. I closed the emulator and ran it again and the images were shown.

    I don't know why you have to do it, but it worked for me. I hope I can save someone the frustration by posting the answer (I know I had them :D)

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.