0

I have a expandable list view and I want to go a layout(or layout's class) when click child items. How can I do it?

My recently method is displaying toast...

// Listview on child click listener
        expListView.setOnChildClickListener(new OnChildClickListener() {

            @Override
            public boolean onChildClick(ExpandableListView parent, View v,
                    int groupPosition, int childPosition, long id) {
                // TODO Auto-generated method stub
                Toast.makeText(
                        getApplicationContext(),
                        listDataHeader.get(groupPosition)
                                + " "
                                + listDataChild.get(
                                        listDataHeader.get(groupPosition)).get(
                                        childPosition), Toast.LENGTH_SHORT)
                        .show();
                return false;

        }});
Eren
  • 75
  • 8

1 Answers1

0

Your question is not clear. I assume that you want to go to another screen, which is represented by an Activity ?

If it's so, then search for, how to start an Activity in StackOverFlow. There are tons of questions related to it.

osayilgan
  • 5,873
  • 7
  • 47
  • 68
  • Yea I know but in this code block I could'nt add? Because there are toast method within. – Eren Mar 04 '15 at 15:18
  • What do you mean, "you couldn't add" ? – osayilgan Mar 04 '15 at 19:14
  • I couldn't made toast + go to another screen together – Eren Mar 04 '15 at 21:35
  • I don't really understand what you are trying to do. There is nothing wrong if you want to show a toast message and then navigate to another activity. If you share your full code, where you are trying to do that, I will show you how to fix it. – osayilgan Mar 04 '15 at 22:26