I want to remove from the arrow image from the HomeAsUpButton.
I tried removing the arrow's ImageView from the layout (nothing happens) and also tried using SupportActionBar.SetDisplayHomeAsUpEnabled(false);
removes the button functionality entirely.
I'm using johnkil's SideNavigation code. Any suggestions?
Using YouTube's App as example:
With the ActionBar Sherlock, inside your Activity's onCreate
method, you just need to do the following:
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
If the up image does not disappear, it might be something related to the library that you referred. In my app, I use the SlidingMenu library and it works just fine (source: https://github.com/jfeinstein10/SlidingMenu)
EDIT: With the SlidingMenu library, the Activity would look like this:
public class MainAct extends SlidingFragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Sliding menu
// Here I set the menu's layout
setBehindContentView(R.layout.menu_frame);
FragmentTransaction t = getSupportFragmentManager().beginTransaction();
MenuListFrag frag = MenuListFrag.newInstance(getSlidingMenuItems());
t.replace(R.id.menu_frame, frag);
t.commit();
// Customizing the SlidingMenu
SlidingMenu sm = getSlidingMenu();
sm.setShadowWidthRes(R.dimen.shadow_width);
sm.setShadowDrawable(R.drawable.shadow);
sm.setFadeDegree(0.35f);
// Hiding the ActionBar's up button
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setHomeButtonEnabled(true);
}
}
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