Simple Adapter error
<p>I have the following errors when i try to access the simple adapter from my program...</p>

<p>Plz can anyone help me solving the error... Desperate to get it done....</p>

<p><code>android.widget.SimpleAdapter.getCount(SimpleAdapter.java:95) android.widget.ListView.setAdapter(ListView.java:431) com.stellent.gorinka.MusicListActivity.list(MusicListActivity.java:76) com.stellent.gorinka.MusicListActivity$1.run(MusicListActivity.java:67) android.os.Handler.handleCallback(Handler.java:587) android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) android.os.Handler.handleCallback(Handler.java:587) android.os.Handler.dispatchMessage(Handler.java:92) android.os.Looper.loop(Looper.java:123)</code></p>

<p>Here' the code for Adapter...</p>

<pre><code>public class SongsAdapter extends SimpleAdapter{
static List&lt;HashMap&lt;String,String&gt;&gt; songsList;
Context context;
LayoutInflater inflater;
public SongsAdapter(Context context,List&lt;HashMap&lt;String,String&gt;&gt; imgListWeb,int layout,String[] from,int[] to,LayoutInflater inflater) {
    super(context,songsList,layout,from,to);
    this.songsList=songsList;
    this.context=context;
    this.inflater=inflater;
    // TODO Auto-generated constructor stub
}@Override
public View getView(int postition,View convertView,ViewGroup parent)throws java.lang.OutOfMemoryError{
    try {
    View v = ((LayoutInflater) inflater).inflate(R.layout.row,null);
    ImageView images=(ImageView)v.findViewById(R.id.image);
    TextView tvTitle=(TextView)v.findViewById(R.id.text1);
    TextView tvAlbum=(TextView)v.findViewById(R.id.text2);
    TextView tvArtist=(TextView)v.findViewById(R.id.text3);
    HashMap&lt;String,String&gt; songsHash=songsList.get(postition);
    String path=songsHash.get("path");
    String title=songsHash.get("title");
    String album=songsHash.get("album");
    String artist=songsHash.get("artist");
    String imgPath=path;    
    final ImageView imageView = (ImageView) v.findViewById(R.id.image);
    AsyncImageLoaderv asyncImageLoader=new AsyncImageLoaderv();
    Bitmap cachedImage = asyncImageLoader.loadDrawable(imgPath, new AsyncImageLoaderv.ImageCallback() {
        public void imageLoaded(Bitmap imageDrawable, String imageUrl) {
            imageView.setImageBitmap(imageDrawable);
        }
        });
    imageView.setImageBitmap(cachedImage);
    tvTitle.setText(title);
    tvAlbum.setText(album);
    tvArtist.setText(artist);
    return v;
    }
    catch(Exception e){
        Log.e("error",e.toString());
    }
    return null;
}
</code></pre>

<p>And also in my main program the focus is not entering the loop... The implementation in the loop isnt getting executed...Here's the code for it...</p>

<pre><code>public void list()
{      Log.d("#####","#####");
 LayoutInflater inflater=getLayoutInflater();
 String[] from={};
 int[] n={};
 adapter=new SongsAdapter(getApplicationContext(),songNodeDet,R.layout.row,from,n,inflater);
 lv.setAdapter(adapter);}
private Handler handler = new Handler() {
    public void handleMessage(Message msg){
       Log.d("*****","handler");        
      removeDialog(0);
      p.dismiss();
     }
    };  public void webObjectList(Object[] imgListObj,String logInSess) throws XMLRPCException{
    songNodeWeb = new HashMap&lt;?,?&gt;[imgListObj.length];
    if(imgListObj!=null){
        Log.e("completed","completed");
        for(int i=0;i&lt;imgListObj.length;i++){ //imgListObj.length
        songNodeWeb[i]=(HashMap&lt;?,?&gt;)imgListObj[i];
        String nodeid=(String) songNodeWeb[i].get("nid");
        Log.e("img",i+"completed");
        HashMap&lt;String,String&gt; nData=new HashMap&lt;String,String&gt;();
        nData.put("nid",nodeid);        
        Object nodeget=client.call("node.get",logInSess,nodeid);
        HashMap&lt;?,?&gt; imgNode=(HashMap&lt;?,?&gt;)nodeget;
        String titleName=(String) imgNode.get("titles");
        String movieName=(String) imgNode.get("album");
        String singerName=(String) imgNode.get("artist");
        nData.put("titles", titleName);
        nData.put("album", movieName);
        nData.put("artist", singerName);
        Object[]  imgObject=(Object[])imgNode.get("title_format");
        HashMap&lt;?,?&gt;[] imgDetails=new HashMap&lt;?,?&gt;[imgObject.length];
        imgDetails[0]=(HashMap&lt;?, ?&gt;)imgObject[0];
        String path=(String) imgDetails[0].get("filepath");
        if(path.contains(" ")){
            path=path.replace(" ", "%20");
        }
         String imgPath="http://www.gorinka.com/"+path;
         paths.add(imgPath);
        nData.put("path", imgPath);
        Log.e("my path",path);
        String mime=(String)imgDetails[0].get("filemime");
        nData.put("mime", mime);
        SongsList songs=new SongsList(titleName,movieName,singerName,imgPath,imgPath);
        SngList.add(i,songs);
        songNodeDet.add(i,nData);
    }
    Log.e("paths values",paths.toString());     
//  return imgNodeDet;
    handler.sendEmptyMessage(0);
}
  }
    public void getSongs() throws MalformedURLException, XMLRPCException
{  
    String ur="http://www.gorinka.com/?q=services/xmlrpc";
    URL u=new URL(ur);
     client = new XMLRPCClient(u);      
    //Connecting to the website
    HashMap&lt;?, ?&gt; siteConn =(HashMap&lt;?, ?&gt;)  client.call("system.connect");
    // Getting initial sessio id
    String initSess=(String)siteConn.get("sessid");
    //Login to the site using session id        
    HashMap&lt;?, ?&gt; logInConn =(HashMap&lt;?, ?&gt;)  client.call("user.login",initSess,"prakash","stellentsoft2009");
    //Getting Login sessid
    logInSess=(String)logInConn.get("sessid");
    websongListObject =(Object[]) client.call("nodetype.get",logInSess,"");
     webObjectList(websongListObject,logInSess);
     Log.d("webObjectList","webObjectList");
     runOnUiThread(returnRes);
}
</code></pre>

<p>}</p>
