首页 > 代码库 > ListView addHeaderView

ListView addHeaderView

        View headView = getLayoutInflater().inflate(R.layout.igame_wb_details_task_list_layout_header, mLvList, false);
        LinearLayout layout = (LinearLayout) headView.findViewById(R.id.wb_details_activity_rl_lol_prize_task_link);
        mLvList.addHeaderView(layout);

要具体到LinearLayout才可以把布局的具体设置带到ListView中

ListView addHeaderView