Android list footer
<p>I get a null pointer exception at line five/seven of my code:</p>

<pre><code>    LayoutInflater inflater = getLayoutInflater();
    View header = inflater.inflate(R.layout.footer_row, (ViewGroup) findViewById(R.id.header_layout_root));
    TextView tv_footer = (TextView) findViewById(R.id.tv_footertext);
    if(getListView().getCount()&lt;=8) {
        tv_footer.setText("You have no more assignments");
    } else {
        tv_footer.setText(Integer.toString(getListView().getCount()) + " assignments shown");
    }
    getListView().addFooterView(header, null, false);
</code></pre>

<p>I'm not too sure why, so could you tell me? List view's aren't my thing. </p>

<p>I'll tick the right answer!</p>
