SORU
30 Kasım 2010, Salı


Program aracılığıyla çöküşü bir grup ExpandableListView içinde

Yeni bir grup genişletin, son genişletilmiş çöküşü miyim?

CEVAP
30 Kasım 2010, Salı


Eğer bu ExpandableListAdapter, listView ExpandableListView kendisi bir başvurudur koymayı deneyin. Ve lastExpandedGroupPosition üye tamsayı bir değişken içinde ExpandableListAdapter tanımlanır.

    @Override
    public void onGroupExpanded(int groupPosition){
        //collapse the old expanded group, if not the same
        //as new group to expand
        if(groupPosition != lastExpandedGroupPosition){
            listView.collapseGroup(lastExpandedGroupPosition);
        }

        super.onGroupExpanded(groupPosition);           
        lastExpandedGroupPosition = groupPosition;
    }

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • parlophone

    parlophone

    28 ŞUBAT 2006
  • schmittastic

    schmittastic

    9 EYLÜL 2009
  • TheFlashCentre

    TheFlashCent

    22 Mayıs 2008