android - flip images and read them from a xml file store in external server -


i have small pb first succesud read information pay server work display product ( image, category, price) in customerlist view probelm when clic product want image pop , eabel see image in original size , flip around product image ps: product list stor in xml file :

music> <song>     <id>1</id>     <title>cheminées</title>     <artist>brique flammé</artist>     <duration></duration>     <thumb_url>http://www.xxx.com/music/images/pg.png</thumb_url>     <thumb_grand>http://www.xxx.com/music/images/pg.png</thumb_grand> </song> <song>     <id>1</id>     <title>cheminées</title>     <artist>phenicia</artist>     <duration></duration>     <thumb_url>http://www.xxxx.com/music/images/pg.png</thumb_url> </song>  <song>     <id>2</id>     <title>barbecues</title>     <artist>rome</artist>     <duration>new</duration>     <thumb_url>http://www.xxxx.com/music/images/pg.png</thumb_url> </song> <music> 

i read info xml parser : have idea add element thumb_grand in xml file

the url of real size of image in xml file , add new activity when clik on product new activity open original size of image appering , can flipp : have idea didn't know how because don't know how send varibel of id second activity , how activity read xml , display last elemnet of xml file!!!! have use parser xml xml parser

package com.project.fr;  import java.util.arraylist; import java.util.hashmap;  import org.w3c.dom.document; import org.w3c.dom.element; import org.w3c.dom.nodelist;  import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.view; import android.widget.adapterview; import android.widget.button; import android.widget.adapterview.onitemclicklistener; import android.widget.listview; import androidhive.dashboard.r;  public class customizedlistview extends activity {     // static variables     static final string url = "http://www.xxxx/music/product.php";     // xml node keys     static final string key_song = "song"; // parent node     static final string key_id = "id";     static final string key_title = "title";     static final string key_artist = "artist";     static final string key_duration = "duration";     static final string key_thumb_url = "thumb_url";      listview list;     lazyadapter adapter;      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.news_feed_layout);          arraylist<hashmap<string, string>> songslist = new arraylist<hashmap<string, string>>();          xmlparser parser = new xmlparser();         string xml = parser.getxmlfromurl(url); // getting xml url         document doc = parser.getdomelement(xml); // getting dom element          nodelist nl = doc.getelementsbytagname(key_song);         // looping through song nodes <song>         (int = 0; < nl.getlength(); i++) {             // creating new hashmap             hashmap<string, string> map = new hashmap<string, string>();             element e = (element) nl.item(i);             // adding each child node hashmap key => value             map.put(key_id, parser.getvalue(e, key_id));             map.put(key_title, parser.getvalue(e, key_title));             map.put(key_artist, parser.getvalue(e, key_artist));             map.put(key_duration, parser.getvalue(e, key_duration));             map.put(key_thumb_url, parser.getvalue(e, key_thumb_url));              // adding hashlist arraylist             songslist.add(map);         }          //button btn_newsfeed = (button) findviewbyid(r.id.thumbnail);          list=(listview)findviewbyid(r.id.list);          // getting adapter passing xml data arraylist         adapter=new lazyadapter(this, songslist);                 list.setadapter(adapter);           // click event single list row         list.setonitemclicklistener(new onitemclicklistener() {              public void onitemclick(adapterview<?> parent, view view,int position, long id) {                 intent = new intent(getapplicationcontext(), fullimageactivity.class);                 startactivity(i);                     }         });             /* btn_newsfeed.setonclicklistener(new view.onclicklistener() {               public void onclick(view view) {                 // launching news feed screen                 intent = new intent(getapplicationcontext(), fullimageactivity.class);                 startactivity(i);             }         });*/     }    } 

this java parser didi't befor add new element in xml file , fullimageactivity java class want image apear in it. , don't know if idea correct, if how can specially m new android development

pls


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -