I have a BottomSheetDialog and i have inflated my custom layout on it. But when i try to add the menu to it. It doesn't appear.
Discord has the same thing with the menu appearing in the corner as you can see in the image above. How am i supposed to do it. Please help me out.
Here is my code
//This is my ViewProfile BottomSheetDialog
public class ViewProfileFragment extends BottomSheetDialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
CreateView = inflater.inflate(R.layout.fragment_view_profile, container, true);
return CreateView;
}
@Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.view_profile_menu, menu);
}
}