|
|
@@ -1,51 +0,0 @@
|
|
|
-/*
|
|
|
- * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
|
|
|
- */
|
|
|
-package kr.co.zumo.app.lifeplus.view.command;
|
|
|
-
|
|
|
-import android.content.Intent;
|
|
|
-
|
|
|
-import kr.co.zumo.app.lifeplus.model.Model;
|
|
|
-import kr.co.zumo.app.lifeplus.view.IView;
|
|
|
-import kr.co.zumo.app.lifeplus.view.presenter.Presenter;
|
|
|
-
|
|
|
-/**
|
|
|
- * TextShareCommand
|
|
|
- * <pre>
|
|
|
- * </pre>
|
|
|
- *
|
|
|
- * @author 민효동
|
|
|
- * @version 1.0
|
|
|
- * @history 민효동 [2018-09-22] [최초 작성]
|
|
|
- * @since 2018-09-22
|
|
|
- */
|
|
|
-public class TextShareCommand extends Command<Model, IView, Presenter> {
|
|
|
- protected String text;
|
|
|
-
|
|
|
- public TextShareCommand(String text) {
|
|
|
- this.text = text;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void preExecute(Model model, IView view, Presenter presenter) {
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void execute(Model model, IView view, Presenter presenter) {
|
|
|
- Intent intent = new Intent();
|
|
|
- intent.setAction(Intent.ACTION_SEND);
|
|
|
- intent.putExtra(Intent.EXTRA_TEXT, this.text);
|
|
|
- intent.setType("text/plain");
|
|
|
- view.getActivity().startActivity(intent);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void postExecute(Model model, IView view, Presenter presenter) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void dispose() {
|
|
|
-
|
|
|
- }
|
|
|
-}
|