document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package tutorial.web;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.view.View;
  7. import android.widget.EditText;
  8.  
  9. public class WebActivity extends Activity {
  10.     private EditText et1;
  11.    
  12.     /** Called when the activity is first created. */
  13.     @Override
  14.     public void onCreate(Bundle savedInstanceState) {
  15.         super.onCreate(savedInstanceState);
  16.         setContentView(R.layout.main);
  17.        
  18.         et1=(EditText)findViewById(R.id.et1);
  19.     }
  20.    
  21.     public void ejecutar(View view) {
  22.          Intent i = new Intent(this, Actividad2.class );
  23.          i.putExtra("direccion", et1.getText().toString());
  24.          startActivity(i);        
  25.     }
  26. }
');