Android Studio java fragment [on hold]

Hi I need a help in my project I created a menu and I linked with many fragments, now I want link the fragment with a new activity (when i click the fragment go to the new page) i want code to go to the last page

enter image description here

enter image description here

public void maryam() { Intent intent = new Intent(getActivity(), HomFr.class); startActivity(intent); }

this code did not work with me

enter image description here