Button sends you to NavigationDrawerFragment activity using android studio -


i trying link button activity second activity navigationdrawerfragment. it's not working me.

this code executed when button clicked:

public void onclicklistener(){ button gotosaying=(button)findviewbyid(r.id.button);     gotosaying.setonclicklistener(new view.onclicklistener() {       @override       public void onclick(view v) {           intent intent = new            intent(getapplicationcontext(),mainactivity2activity.class);            startactivity(intent);         }     }); 

when create new navigationdrawerfragment activity, creating 2 actions (navigationdrawerfragment) , (mainactivity2activity) automatically.

in code trying call (mainactivity2activity) main activity drawer. there lot of errors appearing. have tried code call simple activity , working, drawer don't know problem.

please me.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -