HeaderAndFooterRecyclerView icon indicating copy to clipboard operation
HeaderAndFooterRecyclerView copied to clipboard

headview 需要自己设置layoutparams才能填充父布局

Open simplepeng opened this issue 9 years ago • 1 comments

like this : public void addHeaderView(View header) {

    if (header == null) {
        throw new RuntimeException("header is null");
    }
    header.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
            ,ViewGroup.LayoutParams.WRAP_CONTENT));
    mHeaderViews.add(header);
    this.notifyDataSetChanged();

simplepeng avatar May 09 '16 09:05 simplepeng

关于这个困扰了我一下午 多谢大神的解答

Ezioer avatar Sep 23 '16 07:09 Ezioer