|
@@ -6,11 +6,13 @@ package kr.co.zumo.app.lifeplus.supervisor.screen;
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
|
|
|
|
|
|
|
|
+import kr.co.zumo.app.lifeplus.activity.ContentsActivity;
|
|
|
import kr.co.zumo.app.lifeplus.activity.ContentsOverviewActivity;
|
|
import kr.co.zumo.app.lifeplus.activity.ContentsOverviewActivity;
|
|
|
import kr.co.zumo.app.lifeplus.activity.NetworkErrorActivity;
|
|
import kr.co.zumo.app.lifeplus.activity.NetworkErrorActivity;
|
|
|
import kr.co.zumo.app.lifeplus.bean.ContentsDeliveryBean;
|
|
import kr.co.zumo.app.lifeplus.bean.ContentsDeliveryBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.DeliveryHelper;
|
|
import kr.co.zumo.app.lifeplus.helper.DeliveryHelper;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ScreenManagerHelper;
|
|
import kr.co.zumo.app.lifeplus.helper.ScreenManagerHelper;
|
|
|
|
|
+import kr.co.zumo.app.lifeplus.supervisor.ActivityDeliveryHelper;
|
|
|
import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
|
|
import kr.co.zumo.app.lifeplus.supervisor.ScreenID;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -31,33 +33,49 @@ public class ActivityScreen extends Screen {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void change() {
|
|
public void change() {
|
|
|
- Class<?> activityClass = null;
|
|
|
|
|
- Intent intent;
|
|
|
|
|
|
|
+ DeliveryHelper deliveryHelper;
|
|
|
|
|
+ ContentsDeliveryBean contentsDeliveryBean;
|
|
|
|
|
+ Intent intent = null;
|
|
|
switch (id) {
|
|
switch (id) {
|
|
|
|
|
+ case ScreenID.CONTENTS:
|
|
|
|
|
+ intent = new Intent(helper.getView().getActivity(), ContentsActivity.class);
|
|
|
|
|
+
|
|
|
|
|
+ deliveryHelper = helper.getDeliveryHelper();
|
|
|
|
|
+ contentsDeliveryBean = deliveryHelper.getPackaging(ContentsDeliveryBean.class);
|
|
|
|
|
+
|
|
|
|
|
+ if (null != contentsDeliveryBean.getContentsBean()) {
|
|
|
|
|
+ Log.w("APP# ActivityScreen | change", "|" + contentsDeliveryBean.getContentsBean().toPrettyJson());
|
|
|
|
|
+
|
|
|
|
|
+ ActivityDeliveryHelper.getInstance().setPackaging(contentsDeliveryBean);
|
|
|
|
|
+ deliveryHelper.clearPackaging();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ break;
|
|
|
case ScreenID.OVER_VIEW:
|
|
case ScreenID.OVER_VIEW:
|
|
|
- activityClass = ContentsOverviewActivity.class;
|
|
|
|
|
- intent = new Intent(helper.getView().getActivity(), activityClass);
|
|
|
|
|
|
|
+ intent = new Intent(helper.getView().getActivity(), ContentsOverviewActivity.class);
|
|
|
|
|
|
|
|
- DeliveryHelper deliveryHelper = helper.getDeliveryHelper();
|
|
|
|
|
- ContentsDeliveryBean contentsDeliveryBean = deliveryHelper.getPackaging(ContentsDeliveryBean.class);
|
|
|
|
|
|
|
+ deliveryHelper = helper.getDeliveryHelper();
|
|
|
|
|
+ contentsDeliveryBean = deliveryHelper.getPackaging(ContentsDeliveryBean.class);
|
|
|
|
|
|
|
|
if (null != contentsDeliveryBean.getContentsBean()) {
|
|
if (null != contentsDeliveryBean.getContentsBean()) {
|
|
|
Log.w("APP# ActivityScreen | change", "|" + contentsDeliveryBean.getContentsBean().toPrettyJson());
|
|
Log.w("APP# ActivityScreen | change", "|" + contentsDeliveryBean.getContentsBean().toPrettyJson());
|
|
|
|
|
|
|
|
- intent.putExtra(Screen.INTENT_CONTENTS_DATA, contentsDeliveryBean.getContentsBean().toJson());
|
|
|
|
|
|
|
+ ActivityDeliveryHelper.getInstance().setPackaging(contentsDeliveryBean);
|
|
|
deliveryHelper.clearPackaging();
|
|
deliveryHelper.clearPackaging();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- helper.getView().getActivity().startActivity(intent);
|
|
|
|
|
break;
|
|
break;
|
|
|
case ScreenID.NETWORK_ERROR:
|
|
case ScreenID.NETWORK_ERROR:
|
|
|
- activityClass = NetworkErrorActivity.class;
|
|
|
|
|
- intent = new Intent(helper.getView().getActivity(), activityClass);
|
|
|
|
|
|
|
+ intent = new Intent(helper.getView().getActivity(), NetworkErrorActivity.class);
|
|
|
helper.getView().getActivity().startActivity(intent);
|
|
helper.getView().getActivity().startActivity(intent);
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
Log.w("APP# ActivityScreen | change", "|" + "activity id bad...");
|
|
Log.w("APP# ActivityScreen | change", "|" + "activity id bad...");
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (null != intent) {
|
|
|
|
|
+ helper.getView().getActivity().startActivity(intent);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|