hi all,
i have a tabactivity with two tabs.
in this tabactivity i have edittext and button to search the local database.
i have a listactivity class as a tabcontent. it shows by the framelayout.
i want to refresh that listactivity based on the text entered in edittext which is in the tabactivity.
how to do that?
i created a method in a listactivity :
public void search(String temp) {
String val=temp;
try{
c=BruTube_Videos.this.getContentResolver().query(Constants.CONTENT_URI, null, Constants.TITLE+" like '%"+val+"%'", null, "DATETIME("+Constants.PUBLISHED+") DESC");
}catch(Exception e){
Log.v(TAG, "exp in cursor");
}
show(c);
}
invoke this method in a tabactivity like this:
EditText et1=(EditText) findViewById(R.id.EditText01);
String temp=et1.getText().toString();
BruTube_Videos vdo_obj=new BruTube_Videos();
vdo_obj.search(temp);
it shows an exception in logcat:
02-12 16:58:26.623: VERBOSE/BruTube_Videos(227): Exception in brutube search:java.lang.IllegalStateException: System services not available to Activities before onCreate()
how can i manage it?
thanks.