from the adapter of a RecyclerView which is contained in an Activity, i\'m trying to launch a fragment when an element of the RecyclerView is pressed, this is my code right
You can not start a Fragment using Intents. Intents provide a communication between activities.
If you want to launch a Fragment from other Fragment you have two options.
1- You can replace or add a new fragment.
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction
.replace( R.id.content_frame, fragment )
.addToBackStack( null )
.commit();
In this case The activity has two fragments.
2- You can launch a new Activity that contains a Fragment.