hi, im trying to make a method to close a fragment inside the java file of the fragment
this is my code:
closeFragment(view);
}```
``` private void closeFragment(View view) {
final FragmentTransaction ft = getParentFragmentManager().beginTransaction();
ft.remove(new GalleryFragment());
ft.commit();
}```
it is not collopsing, it just doesnt do anything