|
|
@@ -3,8 +3,10 @@
|
|
|
*/
|
|
|
package kr.co.zumo.app.lifeplus.supervisor;
|
|
|
|
|
|
+import android.support.v4.app.FragmentTransaction;
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
|
|
|
+import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.view.fragment.factory.FragmentFactory;
|
|
|
|
|
|
/**
|
|
|
@@ -24,11 +26,29 @@ public class FragmentBackStackChanger extends FragmentChanger {
|
|
|
super(activity, containerId, fragmentFactory);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 스크린 전환을 다음으로 진행 효과를 주면서 실행
|
|
|
+ *
|
|
|
+ * @param id ScreenID.LOGIN
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void changeToNext(@ScreenID.FragmentID int id) {
|
|
|
+
|
|
|
+ FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction();
|
|
|
+ fragmentTransaction.addToBackStack("A");
|
|
|
+ fragmentTransaction.setCustomAnimations(R.anim.enter, R.anim.exit, R.anim.back_enter, R.anim.back_exit);
|
|
|
+
|
|
|
+ changeFragment(id, fragmentTransaction);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 이전 스크린으로 전환 popBackStack() 이용
|
|
|
*
|
|
|
* @param id ScreenID.LOGIN
|
|
|
*/
|
|
|
+ @Override
|
|
|
public void changeToBack(@ScreenID.FragmentID int id) {
|
|
|
|
|
|
if (activity.getSupportFragmentManager().getBackStackEntryCount() > 0) {
|