>
> Intent intent = new Intent(this, DisplayMessageActivity.
>
> Well, for one, this isn't valid code...  It should be this:
Intent intent = new Intent(this, DisplayMessageActivity.class);

I have no idea where to put that... It gives me errors, everywhere I tried.
>
> As you said, and according to the tutorial, it belongs inside of the
sendMessage() method.  If you want more help then you are going to have to
tell us what errors you are getting...

Also.... Did you happen to read the note in the tutorial about this line of
code?

*"Note: The reference to DisplayMessageActivity will raise an error if
you’re using an IDE such as Eclipse because the class doesn’t exist yet.
Ignore the error for now; you’ll create the class soon.*"

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 15, 2012 at 5:34 PM, Dutchie <jversne...@gmail.com> wrote:

> Hello, I only recently got into developing an app for Android, and I'm
> following the MyFirstApp tutorial.
>
> However im stuck on the adding and intent part...
>
>
> http://developer.android.com/training/basics/firstapp/starting-activity.html
>
>
> My MainActivity looks like this right now:
>
>
> package com.example.myfirstapp;
>
> import android.app.Activity;
> import android.content.Intent;
> import android.os.Bundle;
> import android.view.Menu;
> import android.view.View;
>
> public class MainActivity extends Activity {
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.activity_main);
>     }
>
>     @Override
>     public boolean onCreateOptionsMenu(Menu menu) {
>         getMenuInflater().inflate(R.menu.activity_main, menu);
>         return true;
>     }
>
>     /** Called when the user clicks the Send button */
>     public void sendMessage(View view) {
>         // Do something in response to button
>
>     }
>
> }
>
>
> And I'm required to add this bit of code inside sendMessage():
>
> Intent intent = new Intent(this, DisplayMessageActivity.
>
> I have no idea where to put that... It gives me errors, everywhere I tried.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to