you should use
imageLoader=new ImageLoader(activity);
instead of
imageLoader=new ImageLoader(activity.getBaseContext());
Change here also
private Activity activity;
to
private Context activity;
also here from
public SimpleAdapter(Activity a, ArrayList<HashMap<String, String>> d)
to
public SimpleAdapter(Context a, ArrayList<HashMap<String, String>> d)