-
Show Content in "List View" Only when "Switch" is "On"
about 9 years ago
-
about 9 years ago
at activity on create check if the switch is on or off and then according to that change the visibility of the list view.
if(swithch is on ){ myListview.setVisblity(View.Visible); }else{ myListview.setVisblity(View.Gone); }
the other alternative is use two different fragments load the second fragment on switch state change.
mark the answer as correct if you find it was helpful so that we could provide regular support to your quarries.
-
-
about 9 years ago
@amit.rai can u provide code for your second recommendation?
-
2 Answer(s)