Ich möchte ein Symbol in der Statusleiste hinzufügen. Ich tried-Android actionbar icon
getActionBar().setIcon(R.drawable.my_icon); //crashes app
getSupportActionBar().setIcon(R.drawable.ic_statusbar_msg); //not working
<activity android:icon="@drawable/my_icon" /> //also not working
<application android:logo="@drawable/Image"> //still not working
Icon nicht auf Aktionsleiste angezeigt wird. Irgendeine Idee?
Verwenden Sie eine Support-Aktionsleiste (Symbolleiste) oder Standard-Aktionsleiste? –
Was wird angezeigt, wenn 'getSupportActionBar() verwendet wird. SetIcon (R.drawable.ic_statusbar_msg); '? –
versuchen Sie dies: http: //stackoverflow.com/questions/26440279/show-icon-in-actionbar-toolbar-with-appcompat-v7-21 –