Action bar app icon missing with Android 5

前端 未结 4 918
面向向阳花
面向向阳花 2021-02-14 08:59

Just rebuilt my app using the Android 5 SDK and associated appcompat.

Seems to work fine but my app icon is no longer showing in top left hand corner. The icon to open

4条回答
  •  不知归路
    2021-02-14 09:06

    You shouldn't have an icon in an API OS 5+ app. By default it is not displayed (and this is the preferred behavior). The Toolbar docs specifically state this:

    "In modern Android UIs developers should lean more on a visually distinct color scheme for toolbars than on their application icon. The use of application icon plus title as a standard layout is discouraged on API 21 devices and newer."

    http://developer.android.com/reference/android/widget/Toolbar.html

提交回复
热议问题