 <p>You can define the content of the <code>onOptionsItemSelected(MenuItem item)</code> method in a helper and then using flavors load the needed helper :</p> <pre><code>@Override public boolean onOptionsItemSelected(MenuItem item) { HelperPart.selectItem(this, item); } // Helper loaded for flavor "part1" static class MenuHelper{ public static boolean selectItem(Activity act, MenuItem item){ switch (item.getItemId()) { case R.id.action_reload: // TODO reload return true; default: return act.onOptionsItemSelected(item); } } } // Helper loaded for flavor "part2" and "full" static class MenuHelper{ public static boolean selectItem(Activity act, MenuItem item){ // Do nothing } } </code></pre>