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

添加头部后,头部只占了一半的宽度 #32

Closed
Jensen0618 opened this issue May 26, 2016 · 2 comments
Closed

添加头部后,头部只占了一半的宽度 #32

Jensen0618 opened this issue May 26, 2016 · 2 comments

Comments

@Jensen0618
Copy link

需求是一个2栏的GridView,但是添加了头部后头部也被压缩到了item的宽度,代码如下

mGvMallEcohList.setLayoutManager(new GridLayoutManager(this, 2));
        mAdapterEcohProduct.addHeaderView(viewHeader);
        mGvMallEcohList.setAdapter(mAdapterEcohProduct);
@alexyuboyan
Copy link

你可以 new StaggeredGridLayoutManager

@Jensen0618
Copy link
Author

可以了,谢谢!

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