Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Photos from camera in a tableview

$
0
0

Hello,

I'm working with an application that take pictures, save and show in a tableview. I don't have any issues with iPhone but I have them on Android.

The first issue is when I show a tableview with the photos in a imageview. The following error is showed when I'm scrolling the tableview: Unable to load bitmap. Not enough memory: null.

And sometimes I can see the images and sometimes don't. Then I have to choose a row from the tableview and show the image on a little bigger image view. the same happens sometimes the picture is showed and sometimes don't.

I'm running the app on a Galaxy SIII Mini, I know that is a limited phone but some users have phones like that.

I´m watching forums and see that I have to compress the images to save memory. Some guys said that module ImageFactory can help but I can't install. I do the Steps on https://github.com/appcelerator/titanium_modules but on Step 4 I have the following message: Unable to download module from the specific URL. Is the URL Valid?

this practically my code it is inside a for block

var prefijoFoto = 'br';
    var pathFotos = Titanium.Filesystem.applicationDataDirectory + "/"+ 'camera_photos/';
    var filename = pathFotos + prefijoFoto + tblItems[i].FolletoID + ".jpg";
 
    //this is just the part when I load the imageview
 
    for (var i = 0; i < tblItems.length; i++) {         
 
        var f = Titanium.Filesystem.getFile(filename);
            var tvImagen = Ti.UI.createImageView({
            left:'1%', 
            width: 50 
            height: 50 
            image : f.exists() ? filename : ''
        }); 
        row.add(tvImagen);
        f = null;   
    }
please help

thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>