Can a GridView have a footer and header just like ListView?

前端 未结 11 2069
北海茫月
北海茫月 2020-12-14 16:29

A quick question:

In ListView I use this code:

list.addHeaderView(headerView);

How to deal with it when working on

11条回答
  •  半阙折子戏
    2020-12-14 17:06

    
    
    
    
        
    
        
        
    
    
    

    and Breadcrumbs:

    public class Breadcrumbs extends LinearLayout {
    
        public Breadcrumbs(final Context context, final AttributeSet attrs) {
            super(context, attrs);
    
            final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            layoutView = inflater.inflate(R.layout.breadcrumbs, this, true);
    

    works fine, scroll for grid works as well.

提交回复
热议问题