0
세 가지 활동이 있습니다. Activity
에 하나 (탐색 메뉴), 나는 2를 시작하는 간단한 ClickListener
있습니다.하나의 활동에 여러 인 텐트 처리
Intent intent3 = new Intent(this, SettingsActivity.class);
intent3.putExtra("from", "BaseActivity");
startActivity(intent3);
finish();
break;
세 Actvity
에 나는 내가 Activity
두에 필요한 일부 데이터를 가지고있다. 나는 Activity
두를 시작하면 난 단지 세 번째에서 첫 Activity
에서 Intent
를 얻을 수 있지만 그래서
//send Data to Setting Activity
Intent mIntent = new Intent(StartActivity.this, SettingsActivity.class);
Bundle mBundle = new Bundle();
mBundle.putString("from", "SettingsActivity");
mBundle.putSerializable("spinnerHashTagItems", (Serializable) spinner_HashTagItem);
mBundle.putSerializable("spinnerUserItem", (Serializable) spinner_UserItem);
mBundle.putBoolean("isCheckedHashTag", isCheckedHashTag);
mBundle.putBoolean("isCheckedHashTagUser", isCheckedHashTagUser);
mBundle.putBoolean("isCheckedAllFromUser", isCheckedAllFromUser);
mIntent.putExtras(mBundle);
: 내가 갔다
//get loadet Settings from StartActivity
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
//do nothing
}
Bundle bundle1 = getIntent().getExtras();
spinner_HashTagItems.clear();
spinner_HashTagItems = (List<String>) bundle1.getSerializable("spinner_HashTagItem");
spinner_userItems.clear();
spinner_userItems = (List<String>) bundle1.getSerializable("spinner_userItem");
chbox_hashTag.setChecked(bundle1.getBoolean("chbox_hashTag"));
chbox_hashTagUser.setChecked(bundle1.getBoolean("chbox_hashTagUser"));
chbox_allFromUser.setChecked(bundle1.getBoolean("chbox_allFromUser"));
그래서 나는이 같은 Bundle
내부의 데이터를 입력 디버거 물마루 Activity
두 Bundle
Activity
1에서 얻을. 어떻게하면 Bundle
을 Activity
에서 3 개 구할 수 있습니까?
이다'startActivity를 UR (mIntent)
는
StartActivity
의 결과를 처리? –활동을 시작하고 싶지 않습니다. 데이터 만 필요합니다. 활동 1은 StartActivity이며, 시작시 설정을로드하고 데이터를 SettingActvity (활동 2)에 지정합니다. 앱 시작시 설정을 시작하고 싶지 않습니다. – dudi
활동 1에서 활동 2를 통해 활동 3으로 보내려는 데이터가 있습니까? – vidulaJ