Listview not working properly
<p>I have a listview in my application. It works fine but when the number of elements <br>increases then on scrolling down and selecting any view,it shows the force close.<br> Why so?
The code segment is given as:</p>

<pre><code> lv1 = (ListView) findViewById(R.id.listView);
     lv1.setAdapter(new ArrayAdapter&lt;String&gt;(this,R.layout.list_item,surveyName));
    // lv1 = getListView();
     lv1.setOnItemClickListener(new OnItemClickListener() {
           public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
             long arg3) {
              ListView lv = (ListView) arg0;
              TextView tv = (TextView) lv.getChildAt(arg2);
              String s = tv.getText().toString();
              for(int i=0;i&lt;ss;i++){
                    if(surveyName[i].equals(s)){
                        id=surveyId[i];
                    }
                }
                Intent j=new Intent(SurveyTool.this,Survey.class);
                Bundle d=new Bundle();
                d.putString("surveyId", id);
                d.putString("userId", userId);
                j.putExtras(d);
                startActivity(j);

           }  });
</code></pre>
