2014-07-11 2 views
0

많은 버튼이있는 단편과 커버 플로우 갤러리가있는 단편이 있습니다. 내가 커버 플로우 프로세스를 반복하고 나는 조각 만드는 방법 내가 여기에 배경에서 일부 이미지를 볼 수있는 커버 플로우로 돌아갑니다 galery에서 변경 :Android Fragment store 고스트 배경 이미지

FragmentManager fm = getFragmentManager(); 
    FragmentTransaction fragmentTransaction = fm.beginTransaction(); 



    if(view == findViewById(R.id.button2)) { 
     fr = new FragmentTwo(); 

    }else { 
     fr = new FragmentOne(); 
    }  
    fragmentTransaction.replace(R.id.fragment_place, fr); 
    fragmentTransaction.addToBackStack(null);  
    fragmentTransaction.commit(); 

당신이 어떤 생각을 가지고 있습니까를?

답변

1

남은 조각에서 애니메이션 등을 표시하지 않으려면 다른 조각을 넣기 전에 조각을보기에서 제거하기 만하면됩니다. 구현 예는 다음과 같습니다.

view.removeView(R.id.layout_of_fragment); 
+0

이것은 내 문제를 해결하는 데 도움이되었습니다. 아직 문제의 원인을 이해하지 못했습니다. :디 – FrancescoC