Fragment 에서 상위 Activity 재시작 하기

프로그래밍/Android (Java)|2019. 8. 28. 17:19
반응형

                         Intent intent = getActivity().getIntent();
                    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK
                            | Intent.FLAG_ACTIVITY_NO_ANIMATION);
                    getActivity().overridePendingTransition(0, 0);
                    getActivity().finish();
                    getActivity().overridePendingTransition(0, 0);
                    startActivity(intent);

 

 

[출처] https://gist.github.com/chrisjenx/3176258

반응형

댓글()