Answer the question
In order to leave comments, you need to log in
How to display app logo in android actionbar?
As you can see on the first skin, the logo is loaded into the manifest, but something breaks in the styles.
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ex.p.thehackernewswallpaper" >
<application
android:allowBackup="true"
android:icon="@drawable/thn"
android:label="@string/app_shortname"
android:theme="@style/AppTheme" >
<activity
android:name=".HomeActivity"
android:label="@string/app_shortname"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<resources>
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/MainActionBarStyle</item>
<item name="actionBarStyle">@style/MainActionBarStyle</item>
</style>
<style name="MainActionBarStyle"
parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/HackNewsDarkBlue</item>
<item name="background">@color/HackNewsDarkBlue</item>
<item name="android:icon">@drawable/thn</item> <!-- не уверен насчет этого, все равно не работает -->
<item name="icon">@drawable/thn</item>
</style>
</resources>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question