I have tried to implement the above by using the following code...
But, this too is showing the same...


public class MusicListActivity extends Activity {
        List<HashMap<String, String>> songNodeDet = new
ArrayList<HashMap<String,String>>();
        HashMap<?,?>[] songNodeWeb;
        XMLRPCClient client;
        String logInSess;
        ArrayList<String> paths=new ArrayList<String>();
        public ListAdapter adapter ;
        Object[] websongListObject;
        List<SongsList> SongsList=new ArrayList<SongsList>();
        Runnable r;
        ProgressDialog p;
        ListView lv;

        @Override
        public void onCreate(Bundle si){
                super.onCreate(si);

                setContentView(R.layout.openadiuofile);
                lv=(ListView)findViewById(R.id.list1);
                r=new Runnable(){

                        public void run(){
                                try{
                                        Log.d("webObjectList","webObjectList");
                                        getsongs();

                                } catch (MalformedURLException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                } catch (XMLRPCException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }
                        }
                };
                        Log.e("mee","process over");
        }

        @Override
        protected void onResume() {
                // TODO Auto-generated method stub
                  super.onResume();

        }

                public void webObjectList(Object[] songListObj,String logInSess)
throws XMLRPCException{
                songNodeWeb = new HashMap<?,?>[songListObj.length];


                for(int i=0;i<songListObj.length;i++){ //imgListObj.length
                        songNodeWeb[i]=(HashMap<?,?>)songListObj[i];
                        String nodeid=(String) songNodeWeb[i].get("nid");

                        Log.e("img",i+"completed");
                        HashMap<String,String> nData=new 
HashMap<String,String>();
                        nData.put("nid",nodeid);
                        Object nodeget=client.call("node.get",logInSess,nodeid);
                        HashMap<?,?> songNode=(HashMap<?,?>)nodeget;
                        String title=(String) songNode.get("title");
                        String album=(String) songNode.get("album");
                        String artist=(String) songNode.get("artist");

                        nData.put("title", title);
                        nData.put("album", album);
                        nData.put("artist", artist);

                        Object[]  
songObject=(Object[])songNode.get("field_image");
                        HashMap<?,?>[] songDetails=new 
HashMap<?,?>[songObject.length];
                        songDetails[0]=(HashMap<?, ?>)songObject[0];
                        String path=(String) songDetails[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)songDetails[0].get("filemime");
                        nData.put("mime", mime);
                        SongsList songsList=new SongsList(title, album, artist,
imgPath,imgPath);
                        SongsList.add(i,songsList);
                        songNodeDet.add(i,nData);
                }

                Log.e("paths values",paths.toString());
        //      return imgNodeDet;
                handler.sendEmptyMessage(0);
        }


        private Runnable returnRes = new Runnable() {

            public void run() {
                Log.d("handler","handler");
                        removeDialog(0);
                  p.dismiss();
                  list();
                }
                };

        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);
          }

        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<?, ?> siteConn =(HashMap<?, ?>)
client.call("system.connect");
                // Getting initial sessio id
                String initSess=(String)siteConn.get("sessid");
                //Login to the site using session id
                HashMap<?, ?> logInConn =(HashMap<?, ?>)
client.call("user.login",initSess,"username","password");
                //Getting Login sessid
                logInSess=(String)logInConn.get("sessid");


                 websongListObject =(Object[])
client.call("nodetype.get",logInSess,"images");
                webObjectList(websongListObject,logInSess);
                Log.d("webObjectList","webObjectList");
                 runOnUiThread(returnRes);
        }
        private Handler handler = new Handler() {
        public void handleMessage(Message msg){
           Log.d("handler","handler");
          removeDialog(0);
          p.dismiss();


        }
  };

}


Adapter Class

public class SongsAdapter extends SimpleAdapter{
        static List<HashMap<String,String>> songsList;
        Context context;
        LayoutInflater inflater;


        public SongsAdapter(Context context,List<HashMap<String,String>>
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 rowView = ((LayoutInflater)
inflater).inflate(R.layout.row,null);
                        ImageView
images=(ImageView)rowView.findViewById(R.id.image);
                        TextView 
tvTitle=(TextView)rowView.findViewById(R.id.text1);
                        TextView 
tvAlbum=(TextView)rowView.findViewById(R.id.text2);
                        TextView
tvArtist=(TextView)rowView.findViewById(R.id.text3);
                HashMap<String,String> 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)
rowView.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 rowView;

                }
                catch(Exception e){
                        Log.e("err",e.toString());
                }
                return null;
        }
    public static Bitmap loadImageFromUrl(String url) {
        InputStream inputStream;Bitmap b;
    try {

        inputStream = (InputStream) new URL(url).getContent();
        BitmapFactory.Options bpo=      new BitmapFactory.Options();
                bpo.inSampleSize=2;
                 b=BitmapFactory.decodeStream(inputStream, null,bpo );
                 return b;
    } catch (IOException e) {
            throw new RuntimeException(e);
        }

    }
}










-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to