Android ActionBar and Cursor
<pre><code>public class TaskDetailTabHome extends Activity implements ActionBar.TabListener{
String taskid, empid, ac;
private DbAdapter_Assignment assignment;


 @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tasktab);

        taskid = getIntent().getExtras().getString("TaskID");
        empid = getIntent().getExtras().getString("EmpID");
        ac = getIntent().getExtras().getString("AC");

         ActionBar bar = getActionBar();
         bar.addTab(bar.newTab().setText("TASK").setTabListener(this));        
         bar.addTab(bar.newTab().setText("COMMENT").setTabListener(this));        
         bar.addTab(bar.newTab().setText("FLIGHT").setTabListener(this));        

         bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_USE_LOGO);        
         bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);        
         bar.setDisplayShowHomeEnabled(true);        
         bar.setDisplayShowTitleEnabled(false);

         assignment =  new DbAdapter_Assignment(getBaseContext());
         assignment.open();


 }
@Override
public void onTabReselected(Tab arg0, FragmentTransaction arg1) {

}
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
    if(tab.getText()== "TASK")
    {
        setContentView(R.layout.tasktab);
        Cursor c  = assignment.taskDetails(taskid, empid);  ??????????
    }

}
</code></pre>

<p>I am trying to pupulate the view with SQLite data. But the cursor is throwing an error(NullPointerException). The same cursor is working when I am not using ActionBar(tabs). what am I doing wrong ?</p>
