android: menu item click event from fragment
I have an application with actionbar. And there is menu inflated by the mainactivity. I want to intercept the click event inside the fragment but I don't know how? Can you help me please? MainActivity @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.home, menu); } home.xml <menu> <item android:id="@+id/action_refresh" android:title="@string/menu_refresh"/> </menu> And I want to refresh the list in the fragment If you want to capture the click on your item, implement public boolean onOptionsItemSelected(MenuItem item) And then: If your activity includes