2012-02-23 6 views
0

활동 그룹에 매우 복잡한 문제가 있습니다. 내 응용 프로그램에서는 ActivityGroup을 사용했습니다. 다른 활동 탐색을 통해 내가 사용 : 내가 활동을 변경하지 않고 동일한 탐색을 할 것 한 번 더 다음이의 오류를 제공하면 이제 다른 화면이이 의도를 탐색하면Android ActivityGroup 활동 의도 탐색

Intent activityIntent = new Intent(v.getContext(), Reschedule.class); 
    activityIntent.putExtra("dialog_selcted_Appointment_date_time", selected_date +" "+ selected_time); 
    replaceContentView("activity3", activityIntent); 

private void replaceContentView(String id, Intent newIntent) { 
    View view = this.getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) .getDecorView(); this.setContentView(view);} 

내 문제가있다 :

02-23 18:16:15.200: E/ACRA(2433): 
Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- 
token [email protected] is not valid; is your activity running? 

답변

1

View view = getApplicationContext().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) .getDecorView(); this.setContentView(view);} 

는 또한, ActivityGroup 클래스는 현재 사용되지 않습니다보십시오. 이 목적을 위해 Fragments를 사용하는 것이 더 쉽고 쉽습니다. http://developer.android.com/guide/topics/fundamentals/fragments.html을 참조하십시오.