Android :ListView.setAdapter shows null exception
<p>Hi
I have a listview which bind data using setAdapter ,but when i try to bind it shows Null point exception </p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
      try {
          listView1 = (ListView) findViewById(R.id.ListView);

        Thread t = new Thread() {
            public void run() {
                listItems=getList();
                pHandler.post(mUpdateResults);
            }
            };
        t.start();  
    } catch (Exception e) {

        progress.dismiss();

    }
}
final Handler pHandler = new Handler();

// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
    public void run() {
        updateTabData();
    }
};
private void updateTabData() {
    try {


        this.post_Adapter = new PostAdapter(this, R.layout.outkrys,
                listItems);

        Toast.makeText(OutKrys.this, "Inside updateTab after post_adapter intial "+this.post_Adapter.items.size(), Toast.LENGTH_LONG).show();
    listView1.setAdapter(new PostAdapter(this, R.layout.outkrys,listItems));                                
                progress.dismiss();
    } catch (Exception e) {
        Toast.makeText(OutKrys.this, "Inside updateTabData "+e, Toast.LENGTH_LONG).show();
        progress.dismiss();

    }
}
</code></pre>

<p>in this this.post_Adapter.items.size() show count but ,i cant use listView1.setAdapter(new PostAdapter(this, R.layout.outkrys,listItems));
please Help ...
Regards Augustine</p>
