Created
April 7, 2019 14:45
-
-
Save codingpizza/a4a55cde59499a8f38989d6b43bdc107 to your computer and use it in GitHub Desktop.
Using Navigation Controller with onClickListener Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ivDog.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Navigation.findNavController(v).navigate(R.id.action_mainFragment_to_detailFragment); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment