final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
upArrow.setColorFilter(getResources().getColor(R.color.app_theme_color), PorterDuff.Mode.SRC_ATOP);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {`enter code here`
mActionBar.setHomeAsUpIndicator(getResources().getDrawable(R.drawable.arrow));
}
答案 0 :(得分:0)
您可以像这样更改图标....
希望这会有所帮助......
menu.findItem(R.id.menu_search).setOnActionExpandListener(this);
// Your Activity/Fragment must implement the MenuItem.OnActionExpandListener interface
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
getSherlockActivity().getSupportActionBar().setIcon(R.drawable.uvweb_logo);
return true;
}