I have a toolbar:
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
...
I would like to use my own icon for the overflow icon showing on the right side of the toolbar. So, I tried:
// I am using ButterKnife library to bind views
@BindView(R.id.my_toolbar)
Toolbar mToolBar;
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ButterKnife.bind(this);
setSupportActionBar(mToolBar);
// use my_icon.png for overflow icon of toolbar
mToolBar.setOverflowIcon(getResources().getDrawable(R.drawable.my_icon));
}
When I run my app, there is no overflow icon showing.... Why?
How to customize overflow icon of ToolBar?