mAdapter.addHeaderView(view,-1,LinearLayout.HORIZONTAL);addfooterview有一个重载方法,要设置footerview的方向为horizontal才会使wrap_content生效