The question doesn't really have much to go on but I'll give it a shot.
The only line which shows using getText()
is this one...
//sendsentence=id_st1_event_edit.getText().toString();
As mentioned in comments on the question the most likely cause is NullPointerException
. If that's the case then id_st1_event_edit
is null.
If that's the case then the following line in onCreate(...)
id_st1_date_edit=(EditText)findViewById(R.id.id_st1_date_edit);
...is failing to find an EditText
with resource id R.id.id_st1_date_edit
which suggests that particular EditText
isn't in your activity_main.xml
layout file.
Bearing in mind you're calling setContentView(...)
in several places I'm guessing it's actually in the browse_new.xml
layout file (or another layout file).
If that's the case then your problem is that you can only use findViewById(...)
to find views in the current content view. Move whichever calls to findViewById(...)
to the methods which change the content view. Example...
public void browseEvent(View V)
{
setContentView(R.layout.browse_new);
// Call findViewById(...) for any widgets in browse_new.xml here
}