try with this, works for me using appCompat v21
final MenuItem switchButton = menu.findItem(R.id.action_import);
final MenuItem searchItem = menu.findItem(R.id.action_search);
MenuItemCompat.setShowAsAction(searchItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
MenuItemCompat.setShowAsAction(switchButton, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);