Does any1 have a idea of what i'm doing wrong?

On Feb 14, 1:21 pm, automerc <[email protected]> wrote:
> I am having trouble running my application as every time i try to run
> it the simulator gives me a an error. I looked through the
> Documentation but I couldn't find anything on user created classes.
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.widget.Button;
> import android.widget.EditText;
>
> publicclasssurvey extends Activity {
>         private EditText questions;
>         private EditText answers;
>         private Button next;
>         private Button done;
>         private OnClickListener nextListener;
>         private OnClickListener doneListener;
>         private Forms list = new Forms();
>          int t;
>
>         /** Called when the activity is first created. */
>     @Override
>
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.questions_app);
>         questions = (EditText) findViewById(R.id.questions);
>         answers = (EditText) findViewById(R.id.answers);
>         next = (Button) findViewById(R.id.next);
>         done = (Button) findViewById(R.id.done);
>         t = 0;
>         nextListener = new OnClickListener(){
>                 public void onClick(View v) {
>                                 // TODO Auto-generated method stub
>                                 String qtemp = questions.getText().toString();
>                                 list.setA(t, qtemp);
>                                 String atemp = answers.getText().toString();
>                                 String[] answer = atemp.split("|");
>                                 list.setQ(t, answer);
>                                 t++;
>                                 questions.setText("");
>                                 answers.setText("");
>                         }
>
>         };
>         doneListener = new OnClickListener(){
>
>                         public void onClick(View v) {
>                                 // TODO Auto-generated method stub
>                                //starting temp and finishing the
> current activity
>                                 Q_end temp = new Q_end();
>                                 temp.startActivity(null);
>                                 finish();
>                         }
>         };
>         done.setOnClickListener(doneListener);
>     }
>
> }
>
> I figure out that the instance of the Formsclassis the cause but I'm
> not sure why. Forms is aclassthat I created in the same package.
> Also when I try to start the activity Q-end and finish the current
> activity, it also gives me a error. Can some1 tell me what i'm doing
> wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to