I'm trying to make an application for android application. I use 2 icons. ic_launcher.png and for the application and ic_nav_bar_logo.png to display in the toolbar line. The icon for the application is specified in the manifest.

<application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:logo="@drawable/ic_nav_bar_logo"> 

An icon in the status bar is set for each activity.

 <activity android:name=".Activity" android:icon="@drawable/ic_nav_bar_logo" > 

At the same time, after the application is launched on the device, the icon for the status of the bar is displayed as an application icon, but an icon is displayed in the application manager, which should be the application icon. How to set an icon for the application and for the toolbar of each active thread?

  • Try to reformulate the question. I personally understood little. What does the status bar and where is that not displayed? - Yuriy SPb
  • Unfortunately, my rating does not allow me to post images. The question is that the application uses ic_nav_bar_logo instead of the expected ic_launche - evgeniy.se
  • You can try to explain with the text ... Try to remove the android: logo from the application - YuriySPb
  • removed the same result logo - evgeniy.se

2 answers 2

figured out. added to the project (for each screen) icons with extension 144 * 144. It did not have to change the icons for the navigation bar.

    Place an Toolbar ImageView into your Toolbar ImageView .

     <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/tool_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorPrimaryDark" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="right" > <ImageView android:paddingRight="15dp" app:srcCompat="@drawable/yourPicture" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> 

    Ps. if you need to display different pictures in different activity in your toolbar , then in the onCreate() method of each activity program for your toolbar