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

 3 Answer(s)

  • Create a button in fragment layout file and in fragment java file apply on click listener on the button and write the following code

    getActivity().getFragmentManager()
                    .beginTransaction()
                    .replace(R.id.container, new Fragment_InputData())
                    .addToBackStack(Fragment_InputData.class.getSimpleName())
                    .commit();
    
    

    for more you can find a sample project with this answer

  • http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/ in this example in the fragment i give button and on button click i wanted to go to another fragment like intent we go and intent we apple on button click but i dont know how to do that in fragment.

  • Please explain a bit more what do you want to do on click of the button is that you want to open the activity that has navigation drawer init or you want to slide the navigation drawer on button click.

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: