Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 2 Answer(s)

  • 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.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: