Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAzaz/08a4cdefd47fac1b770aa7e4e015acdf to your computer and use it in GitHub Desktop.
Save AliAzaz/08a4cdefd47fac1b770aa7e4e015acdf to your computer and use it in GitHub Desktop.
ExpandableListView in Scrollview
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.expandable, container, false);
ExpandableAdapter adapter = new ExpandableAdapter();
expandableListView.setAdapter(adapter);
setExpandableListViewHeight(expandableListView, -1);
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int position, long id) {
setExpandableListViewHeight(parent, position);
return false;
}
});
return view;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment