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 [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