I have a problem. I am trying to change the default options menu, different for each fragment. I created an xml file for each fragment, and I put them in the res / menu folder. Now I donโt know how to tell android to change the default settings menu in each fragment. I put the snippet in the pager view. The menu I'm talking about is the one below, next to the home and back buttons.
this is one of the custom menus
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.prova.Frase" > <item android:id="@+id/one" android:title="Scatta Foto"/> <item android:id="@+id/two" android:title="Scegli dal Rullino"/> <item android:id="@+id/three" android:title="Prossimo sfondo predefinito"/> </menu>
source share