-
I need to go to the on navigation drawer activity on button click .
almost 10 years ago
-
almost 10 years ago
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
-
-
almost 10 years ago
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.
-
-
almost 10 years ago
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.
-
3 Answer(s)