1

I have created custom actionbar layout with no paddings and margins for image. But when I run the app I see some space between left screen border and logo.

On image logo is black rectangle. How to remove this space and make logo stick to the left screen side?

enter image description here

  • its better if you remove custom action bar and use a relative layout of fix height say 50 or 60dp and then customize it liek action bar – Pankaj Arora Jun 14 '14 at 20:24
  • You can Ref the stackoverflow [Android: remove left margin from actionbar's custom layout][1] [1]: http://stackoverflow.com/questions/27354812/android-remove-left-margin-from-actionbars-custom-layout – Bijesh P V Jan 21 '15 at 12:19
  • Related https://stackoverflow.com/questions/27354812/android-remove-left-margin-from-actionbars-custom-layout – Hoa Nguyen May 23 '17 at 05:02

1 Answers1

1

What you are seeing is the logo/home button of the ActionBar just disable it.

add this in your onCreate()

    getActionBar().setDisplayHomeAsUpEnabled(false);
    getActionBar().setDisplayShowHomeEnabled(false);
    getActionBar().setDisplayUseLogoEnabled(false);
Pongpat
  • 13,248
  • 9
  • 38
  • 51
Rod_Algonquin
  • 26,074
  • 6
  • 52
  • 63