title: Loop to fill an String array for use in listview (not fill from loop)
body: <p>How to use "CurrlstArr" is not able to show the value . I dont know whats the problem using for loop string array.</p>
  
  <pre><code>    mainListView = (ListView) findViewById( R.id.listView100 );
  
  
       SharedPreferences prefs = getSharedPreferences("MY_FAVOURITES", MODE_PRIVATE); 
  String    test_string = prefs.getString("name", "");
  
    persons = test_string.split("DDDDDDDDDD");
  
   int  t = persons.length;
  
    if(t&lt;0)
  
    {
        Toast.makeText(getApplicationContext(),"xtronlabs", Toast.LENGTH_SHORT).show();
    }
    else
  
    {
        for (int i = 0; i &lt; persons.length; i++)
        {
        String currlst = persons[i];
      currlstArr = currlst.split("LLLLLLLLLL");  
  
      caption = currlstArr[0];
  
       vlink = currlstArr[1];
  
  
        }
  
  
      mainListView.setAdapter(new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1,currlstArr ));
  
    }
  </code></pre>
  
  <p>How to use String value on listview i dnt know what my error.</p>