Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a blank above actionbar on 3.0.4 #234

Open
destinyd opened this issue May 4, 2014 · 0 comments
Open

There is a blank above actionbar on 3.0.4 #234

destinyd opened this issue May 4, 2014 · 0 comments

Comments

@destinyd
Copy link

destinyd commented May 4, 2014

MenuDrawer mMenuDrawer = MenuDrawer.attach(this, MenuDrawer.Type.BEHIND, Position.TOP, MenuDrawer.MENU_DRAG_WINDOW);
mMenuDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_FULLSCREEN);

You can see this.

- 20140504 - 184238

in MenuDrawer

@Override
     protected boolean fitSystemWindows(Rect insets) {
       if (mDragMode == MENU_DRAG_WINDOW) {
          mMenuContainer.setPadding(0, insets.top, 0, 0);
       }
        return super.fitSystemWindows(insets);
     }

this code control it,

I change it to

    @Override
    protected boolean fitSystemWindows(Rect insets) {
        if (mDragMode == MENU_DRAG_WINDOW) {
//            mMenuContainer.setPadding(0, insets.top, 0, 0);

            // fix actionbar title big
            ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) this
                    .getLayoutParams();
            int top = params.topMargin + insets.top;
            int bottom = params.bottomMargin + insets.bottom;
            int left = params.leftMargin + insets.left;
            int right = params.rightMargin + insets.right;
            params.setMargins(left, top, right, bottom);
            return true;
        }

        return super.fitSystemWindows(insets);
    }

It work for me.
But i don't know what error it will cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant