Используйте Parcelable для передачи объекта из одной активности Android в другую

Я хочу сделать это

class A extends Activity{
   private class myClass{
   }
   myClass obj = new myClass();

  intent i = new Intent();
  Bundle b = new Bundle();
  b.putParcelable(Constants.Settings, obj); //I get the error The method putParcelable(String, Parcelable) in the type Bundle is not applicable for the arguments (int, A.myClass)
  i.setClass(getApplicationContext(),B.class);
  startActivity(i);  
}

Как использовать Parcelable для передачи obj в действие B?

6
задан Namratha 11 June 2012 в 06:19
поделиться