In Progress

populate ListView with photos - i have memory leak

I have an App that get array of URI's of photos from the android gallery (i get each URI after ACTION_PICK).

i need to populate a listview with a row layout (Attached file).

the way i do it, i get a memory leak...

i need the code to populate the list view with 30 photos at least.

SDK 4 - Android 1.6+

Thats my Adapter

public class ListAdapter extends ArrayAdapter<Photo>{

private int layout;

private PhotosList items;

public ListAdapter(Context context, int layout, PhotosList objects) {

super(context, layout, objects);

items = objects;

Log.i("ADAPTER", "INSIDE CONSTRUCTOR");

[url removed, login to view] = layout;

}

@Override

public View getView(int position, View convertView, ViewGroup parent) {

final LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);

View v = [url removed, login to view](layout, parent, false);

Log.i("ADAPTER", "FINISHED INFLATOR");

Photo p = [url removed, login to view](position);

if (p != null) {

Log.i("ADAPTER", "INSIDE P!=NULL");

TextView prop = (TextView) [url removed, login to view]([url removed, login to view]);

ImageView iv = (ImageView) [url removed, login to view] ([url removed, login to view]);

if(iv == null)

Log.i("ADAPTER", "IV == NULL");

if (prop != null) {

Log.i("ADAPTER", "INSIDE TEXTVIEW");

[url removed, login to view]([url removed, login to view]());

}

if(iv != null){

bm = [url removed, login to view]([url removed, login to view]([url removed, login to view]()),100, 100, true);

[url removed, login to view](bm);

[url removed, login to view](true);

[url removed, login to view](ImageView.ScaleType.CENTER_INSIDE);

[url removed, login to view](100);

[url removed, login to view](100);

Log.i("ADAPTER IMAGEVIEW", [url removed, login to view]());

}

}

return v;

}

}

Skills: Android, Mobile App Development

See more: android listview memory leak, android listview leak, memory listview android, android memory leak, android listview memory, listview leak, arrayadapter photo, memory leak listadapter, imageview listadapter memory, android populate gallery, imageview setmaxwidth listview, android gallery memory leak, listview imageview memory leak, imageview memory leak, textview android, row 44, int v, int i, imageview android, context android, android viewgroup, android uri, android textview, android scaletype, android imageview scaletype

About the Employer:
( 2 reviews ) shear yeshuv, Israel

Project ID: #1118290

Awarded to:

MieluNegru

Dear Sir! I am interested in your project. Please check your pmb for details.

$30 USD in 1 day
(6 Reviews)
4.0

10 freelancers are bidding on average $67 for this job

sakthi85vel

Hello sir, please check your pmb.. thank u sir.

$30 USD in 1 day
(18 Reviews)
5.4
mguptalx

I can deliver the solution.

$30 USD in 1 day
(2 Reviews)
5.1
yohanaryan

HI please check PMB Regards yo

$250 USD in 1 day
(3 Reviews)
5.0
itsani4u

Dear Sir, Please check you PM. Regards.

$30 USD in 1 day
(13 Reviews)
4.2
rarora

Hello Shahar kindly check pmb.

$150 USD in 1 day
(2 Reviews)
3.8
asifhasnain85

See my PM..

$33 USD in 1 day
(3 Reviews)
3.3
glorious2010

Hi, I think I can help you. Thanks

$30 USD in 2 days
(4 Reviews)
2.4
softwarevamp

Hello, i can do this in a timely manner look to work with you At your disposal for any query. Regards

$50 USD in 1 day
(0 Reviews)
0.0
androiduet

i can help you free. [Posting of contact details is Prohibited by Freelancer.com Admin] I just join freelancer , I want to increase my rank should expect help. I could do more as this requirement

$30 USD in 1 day
(0 Reviews)
0.0
Zeldan

please, check pm

$35 USD in 1 day
(0 Reviews)
0.0