title: How to reach bottom of listview, load more items
body: <p>When I reach the bottom of my ListView (Scroll down until the end), how do I load more items? 
  Here is my class (maybe it will help) </p>
  
  <pre><code>public class ListFood extends Activity {
  
      int userid;
      String cat;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.list_food);
  
        ListView lv = (ListView) findViewById(R.id.ListView01);
        TextView tv = (TextView) findViewById(R.id.TextView01);
        Webservice ws = new Webservice();
        List&lt;Afood&gt; list = new ArrayList&lt;Afood&gt;();
        int i;
  
        Bundle bundle = getIntent().getExtras();
        userid = bundle.getInt("userid");
        cat = bundle.getString("cat");
  
        list = ws.getFoodFromCat(cat);
        String [] food = new String [list.size()];
  
        for(i=0;i&lt;list.size();i++)
        {
          food[i] = list.get(i).name;  
        }
  
        if(cat.equalsIgnoreCase("FastFood"))
            tv.setText("Fast Food");
        else
            tv.setText(cat);
  
        lv.setAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.list, food));     
  
        lv.setTextFilterEnabled(true);
  
        lv.setOnItemClickListener(new OnItemClickListener() {
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
              int position, long id) {
            // When clicked, show a toast with the TextView text
            Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
                Toast.LENGTH_SHORT).show();
          }
        });
      }
  
  }
  </code></pre>