From: Miggi <mig...@go...> - 2011-03-22 20:13:59
|
Hello, I've extended my little dummy project and added a second Activity which should start after pressing the button...but that doesn't work. The compilation was finished without an error and the project started in iPhone simulator. Here is the code of the first Activity. I think all parts should be supported: package de.android.ContactForms; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.CheckBox; import android.widget.EditText; import android.widget.TextView; public class ContactForm extends Activity { public static String name; public static String email; public static String feedback; public static Boolean bool; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } public void sendFeedback(View button) { final EditText nameField = (EditText) findViewById(R.id.EditTextName); name = nameField.getText().toString(); final EditText emailField = (EditText) findViewById(R.id.EditTextEmail); email = emailField.getText().toString(); final EditText feedbackField = (EditText) findViewById(R.id.EditTextFeedbackBody); feedback = feedbackField.getText().toString(); final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox1); if(checkBox.isChecked()){ bool = true; }else{ bool = false; } startActivity(new Intent(ContactForm.this, Sended.class)); } } Or do you need some other information? Thank you. Miggi |