what error you are getting the code seems to be fine but call the invia
method from oncreate and why you pass view as method argument.

On Sun, Jun 12, 2016 at 8:14 PM, Simon Usardi <[email protected]> wrote:

> package com.example.non.inizializzareunaltraactivity;
>
> import android.content.Intent;
>
> import android.support.v7.app.AppCompatActivity;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.EditText;
>
> public class MainActivity extends AppCompatActivity {
>     public  final static String messaggioExtra = 
> "com.example.non.inizializzareunaltraactivity.MESSAGE";
>
>     @Override
>     protected void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         setContentView(R.layout.activity_main);
>
>     }
>     public void invia(View view){
>
>         Intent Portale = new Intent(this, PaginaMessaggio.class);
>
>         EditText nascoasto = (EditText)findViewById(R.id.Hint);
>         String y = nascoasto.getText().toString();
>
>         Portale.putExtra(messaggioExtra, y);
>         startActivity(Portale);
>     }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/baf053d4-dd01-4ef0-86c5-c001c35323ac%40googlegroups.com
> <https://groups.google.com/d/msgid/android-developers/baf053d4-dd01-4ef0-86c5-c001c35323ac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CABHzXAS4-A72r8xGpmrkxAJ%3DAi4-rw%2BH9p_h_BYZYyX6mL3DWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to