on-internet
← Community

expandable listview android change layout on click

Stack Overflow ·

I have android project where I have to change layout of last exxpanded group (which will collapse) and the group which is clicked. onGroupClick method i have : int cnt=list.getChildCount(); //set layout to all groups (for closed group) for(int i = 0; i < cnt; i`enter code here`++){ View group = adapter.getGroupView(i, false, null, list); LinearLayout childLayout = (LinearLayout) group.findViewById(R.id.newsLayout); childLayout.setBackgroundResource(R.layout.group_layout_shape); } // set layout of clicked group LinearLayout groupLayout = (LinearLayout) v.findViewById(R.id.newsLayout); groupLayo

Comments

Sign in or sign up to comment and upvote.

No comments yet.