I'm using this (jfeinstein10/SlidingMenu) library to implement sliding menu. In this I want to hide the displayhomeasup arrow from actionbar, but its not allowing to do so.
I tried every possible code found on stackoverflow
I've tried this,
actionbar = getSupportActionBar();
actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionbar.setTitle("");
actionbar.setIcon(R.drawable.menu);
actionbar.setDisplayHomeAsUpEnabled(false);
actionbar.setHomeButtonEnabled(true);
actionbar.setDisplayShowCustomEnabled(true);
actionbar.setCustomView(R.layout.actionbar_title);
I also tried to set it in styles, The code for values-v14 is,
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<item name="android:actionBarStyle">@style/Widget.AppTheme.ActionBar</item>
</style>
<style name="Widget.AppTheme.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@drawable/actionbar_background</item>
<item name="android:displayOptions">showHome|useLogo</item>
<item name="android:homeAsUpIndicator">@null</item>
</style>
</resources>
In this I also tried,
<item name="android:homeAsUpIndicator">@drawable/blank</item>
But none of these code worked,
And at last this, from here
int upId = Resources.getSystem().getIdentifier("up", "id", "android");
if(upId > 0){
ImageView upImage = (ImageView)findViewById(upId);
upImage.setImageResource(R.drawable.blank);
}
This code worked successfully, but problem is It does not guarantee to work in all devices, because here in getIdentifier("up", "id", "android") function "up" keywork may differ menufacture company wise.
I want this thing to work in all devices from api 8 to api 18
Please Help...........