comment obtenir de l'avis du groupe dans expandablelistview dans android?

im blazilian donc, mon anglais n'est pas bon.

Donc.. j'ai besoin d'obtenir de l'avis du groupe dans expandablelistview pour obtenir votre balise d'objet à travers la vue.getTag() la méthode.

me suivre dans cet exemple:

 ExpandableListView

    --> group (i need this view)
    ----> child
    ----> child
    ----> child

    --> group (i need this view)
    ----> child
    ----> child

Mon code:

    @Override
public boolean onChildClick(final ExpandableListView parent, final View v,
        final int groupPosition, final int childPosition, final long id) {

        /* I NEED GET VIEW OF GROUP FOR GET YOUR TAG*/

        View vParent = parent.getChildAt(groupPosition); //dont work after first group 
        Programa v2 = (Programa) parent.getTag(); //return null

        //v parameter is a child of group

    return true;
}

dans ma carte:

    @Override
public View getGroupView(int groupPosition, boolean isExpanded,
        View convertView, ViewGroup parent) {

    TwoLineListItem view = (TwoLineListItem) LayoutInflater.from(contexto)
            .inflate(android.R.layout.simple_expandable_list_item_2,
                    parent, false);

    String programa = map.keySet().toArray(new String[map.keySet().size()])[groupPosition];

    view.getText1().setText(programa);
    view.getText2().setText("PROGRAMA LOCAL");

    view.setTag(programas.get(groupPosition)); //i need get this in child click listener

    return convertView = view;
}

une idée? grâce

Bienvenue à la. S'il vous plaît essayez de faire de votre question claire afin que les gens peuvent comprendre ce que me demandez-vous.
ok... modification: FAIT! 😀
+1 pour la mise à jour. Merci!

OriginalL'auteur user155542 | 2013-10-01