How to use "CurrlstArr" is not able to show the value . I dont know whats the problem using for loop string array.
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<0)
{
Toast.makeText(getApplicationContext(),"xtronlabs", Toast.LENGTH_SHORT).show();
}
else
{
for (int i = 0; i < persons.length; i++)
{
String currlst = persons[i];
currlstArr = currlst.split("LLLLLLLLLL");
caption = currlstArr[0];
vlink = currlstArr[1];
}
mainListView.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,currlstArr ));
}
How to use String value on listview i dnt know what my error.