
Untitled
By: a guest on
Jun 22nd, 2012 | syntax:
None | size: 0.97 KB | hits: 12 | expires: Never
Passing listView row positions through Intents to another class
final ListView listView = getListView();
listView.setItemsCanFocus(false);
listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
listView.setOnItemClickListener(
new android.widget.AdapterView.OnItemClickListener(){
@Override
public final void onItemClick(AdapterView<?> listView, View cell, int position, long id) {
Intent Courses = new Intent(this, ExpandableList.class);
Courses.putExtra(//I'm not sure what to put in here//)
});
private static final String[] GENRES = new String[] {"Barre","Buffumville","Hodges","Newton Hill"};
}
Courses.putExtra("position",position);
getIntent.getExtras().getInt("position");
Intent Courses = new Intent(this, ExpandableList.class);
Courses.putExtra("position",position)
startActivity(Courses);
getIntent.getExtras().getInt("position");