Search code examples
androidlistlistviewexpandable

I want to go layout


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;

        }});

Solution

  • 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.