ActionBar logo not showing on XXHDPI mobile device

I work with an action bar and I want to customize the logo of the action bar. To do this, I wrote the code (below), but it works for Samsung and MicroMax devices , but not for Lenovo K900 and Sony Ericssion Xperia z1 . What should I do?

Api 16 works, but not in 17 (4.2)

the code:

 <style name="AppTheme" parent="AppBaseTheme">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
 </style>

 <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:logo">@drawable/product_category_logo</item>
    <item name="android:background">@drawable/actionbar_theme</item>
    <item name="android:backgroundStacked">@color/black</item>
    <item name="android:backgroundSplit">@color/white</item>
    <item name="android:textColor">#000000</item>
    <item name="android:textSize">16sp</item>
</style>

Values-v14 Folder:

<resources>

<!--
    Base application theme for API 14+. This theme completely replaces
    AppBaseTheme from BOTH res/values/styles.xml and
    res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- API 14 theme customizations can go here. -->
</style>

Value Folder-v11:

<resources>

<!--
    Base application theme for API 11+. This theme completely replaces
    AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<!-- <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> -->
    <style name="AppBaseTheme" parent="android:Theme.Light"><!-- Recent changes -->
    <!-- API 11 theme customizations can go here. -->
</style>

Guy, I don’t know what to do. Please help me.

+3
source share
2 answers

I suggest you use ActionBarSherlock in your application. Because this project is already dealing with such things for you.

Google ActionBar / Google.

GitHub ActionBarSherlock, open source project.

ActionBarSherlock :

git GitHub . > Eclipse.

Project- > Properties- > Android .

: Actionbarsherlock eclipse

, . .

ActionBarSherlock - , Android 3.0, Android API Action Bar v3.0. , , , 3.0 3.0, .

+1

- , vaules-11values-14

<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
 </style>

 <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:logo">@drawable/product_category_logo</item>
    <item name="android:background">@drawable/actionbar_theme</item>
    <item name="android:backgroundStacked">@color/black</item>
    <item name="android:backgroundSplit">@color/white</item>
    <item name="android:textColor">#000000</item>
    <item name="android:textSize">16sp</item>
</style>

, actionbarsharelock actionbarcompart < Android 3.0

-11, -14 .

MyActionBar android.

k'no

0

All Articles