I have the following code:
public class Activity2 extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.accounted);
        TextView tv1 = (TextView) findViewById(R.id.textView1);
        EditText et1 = (EditText) findViewById(R.id.editText1);
        String text1 =  et1.getText().toString();
When I comment out the "string text1..." line the program works. But if I uncomment it, the application force closes.
TextView(tv1) is on the current page but EditText(et1) is on another page. Can that be the cause of my problem? How do I work around it?
 
     
     
     
     
     
    