I’m looking for a way to expand a view when someone clicks on a checkbox.
If checkbox = true, the view expands. if false the view folds.
The basic idea is that I have a class newPokerGame and if the game is a tournament (the checkbox) some view will expand and you can select how many players etc.
I only don’t know what’s the best way to implement this. Any ideas?
Greets!
I’m looking for a way to expand a view when someone clicks on a
Share
to listen to checkbox toggle, use
onCheckChangedListenerto implement “expanding” view, create the layout that you’d want to expand/collapse as you want it to be seen in expanded mode, and just set the visibility of the layout that encloses it inside onCheckChanged. use View’s
setVisibility(View.VISIBLE);or
setVisibility(View.GONE);