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

hvp_topOffset没有效果 #19

Open
WooYu opened this issue Nov 30, 2016 · 1 comment
Open

hvp_topOffset没有效果 #19

WooYu opened this issue Nov 30, 2016 · 1 comment

Comments

@WooYu
Copy link

WooYu commented Nov 30, 2016

app:hvp_topOffset="50dp" 这个属性没什么效果。设置和不设置没有区别,这是怎么回事。

@xymelon
Copy link

xymelon commented Mar 29, 2017

这是因为demo里面MainActivity回调里手动设置了这个参数,你可以把这去掉试试

@Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        //当前窗口获取焦点时,才能正真拿到titlebar的高度,此时将需要固定的偏移量设置给scrollableLayout即可
        scrollableLayout.setTopOffset(titleBar.getHeight());
    }

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

2 participants