OnMenuItemSelected isn't called when layout is set for menu item
问题 I have a menu which is inflated from main_menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/act_sync" android:showAsAction="always" android:actionLayout="@layout/sync_action" android:icon="@android:drawable/ic_popup_sync" /> </menu> and here is the code in the activity: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu, menu); return true; } @Override public boolean onOptionsItemSelected