Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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");
Advertisement
Add Comment
Please, Sign In to add comment