lundi 26 janvier 2015

ActionBar ignoring icon


Vote count:

0




I'm slowly moving my app to Android Lollipop, in fact I'm just beginning this process.


But I'm already having some problems. The first one is that I can't make the icon appear in the ActionBar again. Just the app name and buttons appear.


Here is my style:



<style name="AppTheme" parent="AppTheme.Base"/>

<style name="AppTheme.Base" parent="Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">true</item>
<item name="actionBarStyle">@style/MyApp.Widget.ActionBar.Solid</item>
<item name="actionBarTabStyle">@style/MyApp.Widget.ActionBarTabStyle</item>
<item name="actionModeBackground">@drawable/cab_background_top_MyApp</item>
<item name="actionModeSplitBackground">@drawable/cab_background_bottom_MyApp</item>
<item name="actionModeCloseButtonStyle">@style/MyApp.Widget.ActionButton.CloseMode</item>
<item name="actionBarItemBackground">@drawable/selectable_background_MyApp</item>
</style>

<style name="MyApp.Widget.ActionBar.Solid" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
<item name="android:logo">@drawable/ic_launcher</item>
<item name="background">@drawable/actionbar_background</item>
<item name="backgroundStacked">@drawable/ab_stacked_solid_MyApp</item>
<item name="backgroundSplit">@drawable/ab_bottom_solid_MyApp</item>
<item name="progressBarStyle">@style/MyApp.Widget.ProgressBar</item>
</style>


And here is my AndroidManifest:



<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:name=".MyApp"
android:theme="@style/AppTheme" >
<activity
android:name="com.br.myapp.MainActivity"
android:label="@string/explore"
android:launchMode="singleTop"
android:screenOrientation="portrait" >

</activity>

</application>


And my activity class is extending ActionBarActivity from the AppCompat library v21.



asked 1 min ago







ActionBar ignoring icon

Aucun commentaire:

Enregistrer un commentaire