カスタム オブジェクトと文字列を他のアクティビティに送信する必要があります。カスタム オブジェクト (ユーザー) は、Parcelable インターフェイスを実装します。私はこれが好きです:
Intent intent = new Intent("action") ;
Bundle data = new Bundle() ;
data.putString("EDIT", "EDIT");
data.putParcelable("DATA", user ) ; //user is custom object
intent.putExtra("BUNDLE", data) ;
startActivity(intent) ;
他のアクティビティでは、インテントを受け取りますが、EDIT マップ データが null で、Intent の Pacelable データのみで、EDIT 文字列が欠落しています。
Intent intent = getIntent() ;
String edit = bundle.getString("EDIT") ; // edit = null should be EDIT
Bundle bundle =intent.getBundleExtra("BUNDLE") ;
この問題を知っている開発者が他にいますか? 提案をいただけますか? ありがとう。