Can't make app icon visible android

When creating android app with compat v7 Action Bar there is no app icon in it. I tried even programatically, no result. Manifest

    android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".Newsfeed_Activity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

and styles

<resources>

<style name="AppBaseTheme" parent="Theme.AppCompat.Light">

</style>

<style name="AppTheme" parent="AppBaseTheme">
</style>

Upvotes: 0

Views: 389

Answers (1)

ianhanniballake
ianhanniballake

Reputation: 200110

From Action Bar documentation:

When using the Material themes (default in API 21 or newer) the navigation button (formerly "Home") takes over the space previously occupied by the application icon. Apps wishing to express a stronger branding should use their brand colors heavily in the action bar and other application chrome or use a logo in place of their standard title text.

Therefore you should use ActionBar.setLogo() if you want a logo representing your app in the Action Bar - note: this replaces the title.

Upvotes: 1

Related Questions