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

  • SRT Photoshop Tutorials

    SRT Photosho

    19 Aralık 2012
  • The Brister

    The Brister

    10 ŞUBAT 2008
  • williamfitzsimmons

    williamfitzs

    14 Mart 2008