i followed numerous tuitorials like http://www.javacodegeeks.com/2013/09/android-listview-with-adapter-example.html Also followed the questions asked here How to make custom
public class Menu extends ListActivity {
String classes[]={"startingPoint","TextPlay","TextPlayPerfectJavaCode","EXAMPLE2","example3","example4"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ArrayAdapter adapter = new ArrayAdapter(Menu.this, android.R.layout.simple_list_item_1,classes);
setListAdapter(adapter);
}
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
String className=classes[position];
Class ourClass=null;
try{
ourClass=Class.forName("travis.thenewboston.com.thenewboston."+className);
Intent ourIntent = new Intent(getApplicationContext(), ourClass);//replacing Menu.this - getApplicationContext()
startActivity(ourIntent);
}
catch (ClassNotFoundException e){
e.printStackTrace();
}
finally {
Toast.makeText(Menu.this, "Clicked at Position: "+Integer.toString(position), Toast.LENGTH_SHORT).show();
}
}
}