서버에서 xml을 요청하여

1.리스트에 뿌려줄때 전부 읽어와서 뿌려줄려니

   로딩시간도 길고

   속도가 너무 느리네요..

   마켓에 보면 리스트를 쫙 뿌려준후 

   천천히 하나씩 이미지가 나오잖아요 

   startQuery() , onQueryComplete를 쓰면 된다고 하는데

   잘 안되네요 답변 부탁드리겠습니다

   그리고

2. 밑의 그림처럼 버튼으로 목록 더보기를 하니

    다시 뿌려줄때 단순히 쿼리에 목록 개수를 늘려서

    새로 뿌려줬더니 다시 처음으로 가네요..물론 목록은 늘어났지만요

    마켓처럼 스크롤을 내리면 자동으로 추가 되면서 

    리스트가 늘어 나는 것은 어떻게 해야되나요?
  
   질문이 많네요.. 답변 부탁드리겠습니다

  밑에 소스 첨부 하였습니다

device.png 

public class XmlParser extends ListActivity {
    /** Called when the activity is first created. */
 private int listNumber=10;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        Button btn = (Button)findViewById(R.id.searchBtn);
        Button list_btn = (Button)findViewById(R.id.list_btn);
        final EditText et = (EditText)findViewById(R.id.searchTxt);
       

       //버튼 클릭시 xml을 읽기위한 함수 호출
        btn.setOnClickListener(new View.OnClickListener(){

       public void onClick(View v) {
   
      String searhTxt = et.getText().toString();
      if(searhTxt == ""){
     
      }else{
       searchXml(searhTxt); 
      }
   }
        
        });
        list_btn.setOnClickListener(new View.OnClickListener(){

            public void onClick(View v) {
             listNumber = listNumber+10;
           String searhTxt = et.getText().toString();
           if(searhTxt == ""){
          
           }else{
            searchXml(searhTxt); 
           }
        }
             
             });
    }

 //XmlPullParser를 이용 xml을 읽는다.  

 public void searchXml(String searchTxt){
        String m_searchTxt = "";
     try {
//      m_searchTxt = URLEncoder.encode(searchTxt,"EUC-KR");
      m_searchTxt =URLEncoder.encode(searchTxt);
     } catch (Exception e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
     }
//           String m_sConnectUrl = "http://newssearch.naver.com/search.naver?where=rss&query="+m_searchTxt+"&st=news.all&q_enc=EUC-KR&r_enc=UTF-8&r_format=xml&rp=none&sm=all.basic&ic=all&so=rel.dsc&detail=0&pd=1&start=1&display=20";
       String m_sConnectUrl = "http://openapi.naver.com/search?key=29b0a07ddfe7502eb2d0c585cd448a32&query="+m_searchTxt+"&target=image&start=1&display="+listNumber;
           Log.e("searchTxt",m_searchTxt);
          
           XmlData xmlData = null;
           ArrayList<XmlData> m_xmlData = new ArrayList<XmlData>();
          
           String sTag;
          
          
           try {
           
            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
               factory.setNamespaceAware(true);
               XmlPullParser xpp = factory.newPullParser();
                       
               URL u = new URL(m_sConnectUrl);                
               //InputStream in = u.openConnection().getInputStream();
               InputStream in = u.openStream();
               xpp.setInput(in, "utf-8");

              
               int eventType = xpp.getEventType();
              
               while (eventType != XmlPullParser.END_DOCUMENT) {
                if(eventType == XmlPullParser.START_DOCUMENT) {
                 //   System.out.println("Start document");
                } else if(eventType == XmlPullParser.END_DOCUMENT) {
                 //   System.out.println("End document");
                } else if(eventType == XmlPullParser.START_TAG) {
                
                 Log.e("START_TAG",xpp.getName());
                 sTag = xpp.getName();
                
                 if( sTag.equals("title") ){
                  System.out.println("sTag : title");
                 // Log.e("title_getText",xpp.nextText());
                  xmlData = new XmlData();
                  xmlData.d_title = xpp.nextText() ;
                  System.out.println("title : "+xmlData.d_title);
                 }
                 if( sTag.equals("link") ){
                  System.out.println("sTag : link");
                  xmlData.d_link = xpp.nextText();
                  System.out.println("link : "+xmlData.d_link);
                   }             
                 if( sTag.equals("thumbnail") ){
                  System.out.println("sTag : thumbnail");
                  // Log.e("title_getText",xpp.nextText());              
                   xmlData.d_thumbnail=xpp.nextText();
                   System.out.println("xmlData.d_thumbnail : "+xmlData.d_thumbnail);
                  }

                 //   System.out.println("Start tag "+xpp.getName());
                } else if(eventType == XmlPullParser.END_TAG) {
                 //   System.out.println("End tag "+xpp.getName());
                 sTag = xpp.getName();
                 if( sTag.equals("item")){
                  m_xmlData.add(xmlData);
                  xmlData = null;
                 }
                } else if(eventType == XmlPullParser.TEXT) {
                 //   System.out.println("Text "+xpp.getText());
                }
                eventType = xpp.next();
               }

     
     } catch (Exception e) {
      // TODO: handle exception
     }
          
     System.out.println("m_xmlData : "+m_xmlData);
      XmlListAdapter adapter = new XmlListAdapter(this, R.layout.row, m_xmlData);
      setListAdapter(adapter);
    }

   
   //List의 row를 변형하기 위해 Adapter 오버라이딩
    private class XmlListAdapter extends ArrayAdapter {
 
  private ArrayList items;

  public XmlListAdapter(Context context, int textViewResourceId, ArrayList items) {
   super(context, textViewResourceId, items);
   this.items = items;
  }

  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
 
   View v = convertView;
  
   if(v == null){
    LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    v = vi.inflate(R.layout.row, null);
   }
  
   XmlData xmlData = (XmlData) items.get(position);
   if(xmlData != null){
    TextView tv1 = (TextView)v.findViewById(R.id.title);
    ImageView tv2 = (ImageView)v.findViewById(R.id.thumb);
   
    if(tv1 != null){
     //tv1.setText(xmlData.d_title);
     tv1.setText(
       Html.fromHtml("<a href='"+xmlData.d_link+"'>"
         + xmlData.d_title + "</a>"));
     tv1.setMovementMethod(LinkMovementMethod.getInstance());
    }
    if(tv2 != null){
     
     
    URL url = null;
 try {
  url = new URL(xmlData.d_thumbnail);
 } catch (MalformedURLException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 }
     tv2.setImageBitmap(getRemoteImage(url));//이미지를 등록해야할부분
    }
   }

   return v;
  }
 
 }
    public Bitmap getRemoteImage(final URL aURL) {  
        try {  
            final URLConnection conn = aURL.openConnection();  
            conn.connect();  
            final BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
//            int readbyte = 0;
//            while(-1 != (readbyte = bis.read()))
//            {
//             System.out.print((char)readbyte);             
//            }
            final Bitmap bm = BitmapFactory.decodeStream(bis);  

            bis.close();
            return bm;
          
        } catch (IOException e) {  
            Log.d("DEBUGTAG", "Oh noooz an error...");  
        }  
        return null;  
    } 

 

}