When i set these attributes:
    actionBar = getSupportActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setDisplayShowHomeEnabled(false);
    actionBar.setDisplayShowTitleEnabled(true);
    actionBar.setTitle("Title");
    actionBar.setLogo(null);
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
The ActionBar is below its Tabs.
But if i comment this Like:
actionBar.setDisplayShowHomeEnabled(false);
It works fine. But the reason i want it to be false is, to avoid the appIcon being shown.
Thank You
I googled this problem and found this thread on gitub: https://github.com/JakeWharton/ActionBarSherlock/issues/327
You can read the thread, but the conclusion is:
Hi. Just found a simple workaround.
Use the following in your onCreate method :
View homeIcon = findViewById(android.R.id.home);
((View) homeIcon.getParent()).setVisibility(View.GONE);
this collapses the home button completely.PS : i'm using standard ActionBar but this should work the same
I hope this helps you out,
Daniel.
i used this, and it's work on me
    ActionBar ab = getSupportActionBar();
    ab.setDisplayShowHomeEnabled(true);
    ab.setDisplayHomeAsUpEnabled(false);
    ab.setHomeButtonEnabled(false);
    ab.setLogo(null);
    View homeIcon = findViewById(
            Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ? 
            android.R.id.home : R.id.abs__home);
    ((View) homeIcon.getParent()).setVisibility(View.GONE);
    ((View) homeIcon).setVisibility(View.GONE);
    ab.setDisplayShowTitleEnabled(false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With