Dynamically loading ListView
<p>I want to dynamically load a ListView, for example, load them during the scrolling so its not loading all 100 posts I have. How can I achieve this?</p>

<p>I have looked at similiar solutions here at SO, but since I not got it to work, I asked this question.</p>

<p>My code:</p>

<pre><code>//orders is my is my ArrayList&lt;WithMyOwnOrderClass&gt; that handling orders
/* adapter is my inner private class in this piece of code, that trigging
the getView */
if(orders != null &amp;&amp; orders.size() &gt; 0){

 for(int i=0;i&lt;orders.size();i++){          
     adapter.add(orders.get(i));
 }
            adapter.notifyDataSetChanged();
            progressDialog.dismiss();
 }
</code></pre>

<p>I have in the same .java file, functions to download the info from the web and loop through 100 items, like this:</p>

<pre><code>JSONObject jObject = new JSONObject(queryResult);
SONArray docsArray = jObject.getJSONArray("array");
   for (int i = 0; i &lt; 100; i++) {
      try {      
            title = docsArray.getJSONObject(i).optString("title");   
          } catch (JSONException e) {}      
    }
</code></pre>

<p>and then it add a new order correctly and so on.
But now!(?) I want to have so when the first item is loaded, it should appear and when scrolling it loads gradually.</p>

<p>Hope that this can be achieved and thanks in advance for any help!</p>
