Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 25th, 2012  |  syntax: None  |  size: 1.33 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. problem in moving data's from one page to the other in android
  2. Intent myIntent = new Intent(getBaseContext(), UserInformation.class);
  3.               myIntent.putExtra("i1", name);
  4.               myIntent.putExtra("i2", addlress);
  5. startActivityForResult(myIntent, 0);
  6.        
  7. Intent myIntent = new Intent(getBaseContext(), UserManual.class);
  8.         myIntent.putExtra("i3", regno);
  9.         myIntent.putExtra("i4", dob);
  10. startActivityForResult(myIntent, 0);
  11.        
  12. @Override
  13. public void onCreate(Bundle savedInstanceState)
  14. {
  15.     super.onCreate(savedInstanceState);`
  16.  
  17.     Bundle extras = getIntent().getExtras();
  18.     String i1 = extras.getString( "i1" );
  19.     String i2 = extras.getString( "i2" );
  20.     String i3 = extras.getString( "i3" );
  21.     String i4 = extras.getString( "i4" );
  22.     if((i1 != null) && (i2 != null))
  23.     {
  24.         s = i1 + i2;
  25.         extras.putCharSequence("S", s);
  26.     }
  27.     if((i3 != null) && (i4 != null))
  28.     {
  29.         b = i3 + i4;
  30.         extras.putCharSequence("B", b);
  31.     }
  32. }
  33.        
  34. Bundles extras = getIntent().getExtras();
  35.  String i1 = extras.getString( "i1" );
  36.         String i2 = extras.getString( "i2" );
  37.     Intent myIntent = new Intent(getBaseContext(), UserManual.class);
  38. myIntent.putExtra("i1", i1);
  39. myIntent.putExtra("i2", i2);
  40. myIntent.putExtra("i3", regno);
  41. myIntent.putExtra("i4", dob);
  42.  startActivityForResult(myIntent, 0);