hello i have an android project.i have a mainactivity a listview i want to add data from class not from this mainactivity any help ?
What I have tried:
String[] x = new String[]{"AAA","BBB","CCC","DDD","EEE","FFF","GGG","HHH","III","JJJ","KKK","LLL","MMM","NNN","OOO","PPP","QQQ"};
ListView lv = (ListView) findViewById(R.id.listView1);
ArrayAdapter<string> test = new ArrayAdapter<string>(this, android.R.layout.simple_list_item_1,x);
lv.setAdapter(test);
this is from mainactivity i want from class