Can't display an icon in the actionbar

后端 未结 2 1833
后悔当初
后悔当初 2021-01-14 03:33

I\'m trying to show a map icon downloaded from the official android developers source.

I did everything as it should, but the icon won\'t show. Here is my xml file n

2条回答
  •  北海茫月
    2021-01-14 04:33

    Here is how I fixed it - in case that someone is facing the same issue.

    I changed

    android:showAsAction="always" to app:showAsAction="always" and I also placed the icon order android:orderInCategory="0" and the auto res xmlns:app="http://schemas.android.com/apk/res-auto" so now my xml looks like:

    
    
    
        
    
    
    

提交回复
热议问题