showAsAction = “always” is ignored in Toolbar

前端 未结 2 1454
独厮守ぢ
独厮守ぢ 2020-12-19 11:37

After switching to toolbar there is a problem with menu icons. Although I set for a menu item android:showAsAction=\"always\" it does not show the icon, I can only find it c

2条回答
  •  感情败类
    2020-12-19 11:57

    Replace android:showAsAction with app:showAsAction. You will also need to add xmlns:app="http://schemas.android.com/apk/res-auto" alongside your existing xmlns item in your root element.

提交回复
热议问题