@@ -0,0 +1,3352 @@
+package org.apache.taverna.mobile.ui.workflowdetail;%0A%0A%0Aimport com.bumptech.glide.Glide;%0Aimport com.bumptech.glide.load.engine.DiskCacheStrategy;%0A%0Aimport org.apache.taverna.mobile.R;%0Aimport org.apache.taverna.mobile.data.DataManager;%0Aimport org.apache.taverna.mobile.data.model.DetailWorkflow;%0Aimport org.apache.taverna.mobile.utils.ConnectionInfo;%0A%0Aimport android.os.Bundle;%0Aimport android.support.v4.app.Fragment;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport android.webkit.WebView;%0Aimport android.widget.ImageView;%0Aimport android.widget.TextView;%0A%0Aimport butterknife.BindView;%0Aimport butterknife.ButterKnife;%0A%0Apublic class WorkflowDetailFragment extends Fragment implements WorkflowDetailMvpView %7B%0A%0A    public final String LOG_TAG = getClass().getSimpleName();%0A%0A    @BindView(R.id.ivWorkflowImage)%0A    ImageView workflowImage;%0A%0A    @BindView(R.id.tvTitle)%0A    TextView title;%0A%0A    @BindView(R.id.ivUploader)%0A    ImageView uploaderImage;%0A%0A    @BindView(R.id.tvUploaderName)%0A    TextView uploaderName;%0A%0A    @BindView(R.id.tvDate)%0A    TextView date;%0A%0A    @BindView(R.id.tvType)%0A    TextView type;%0A%0A    @BindView(R.id.tvDescription)%0A    WebView description;%0A%0A    private DataManager dataManager;%0A%0A    private WorkflowDetailPresenter mWorkflowDetailPresenter;%0A%0A    private ConnectionInfo mConnectionInfo;%0A%0A    private static final String ID=%22id%22;%0A%0A    private String id;%0A%0A    public static WorkflowDetailFragment newInstance(String id) %7B%0A%0A        Bundle args = new Bundle();%0A%0A        args.putString(ID,id);%0A%0A        WorkflowDetailFragment fragment = new WorkflowDetailFragment();%0A        fragment.setArguments(args);%0A        return fragment;%0A    %7D%0A%0A    @Override%0A    public void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A%0A        id=getArguments().getString(ID);%0A%0A        dataManager = new DataManager();%0A        mWorkflowDetailPresenter = new WorkflowDetailPresenter(dataManager);%0A        mConnectionInfo = new ConnectionInfo(getContext());%0A    %7D%0A%0A    @Override%0A    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle%0A            savedInstanceState) %7B%0A%0A        View rootView = inflater.inflate(R.layout.fragment_detail_workflow, container, false);%0A%0A        ButterKnife.bind(this, rootView);%0A%0A        mWorkflowDetailPresenter.attachView(this);%0A        mWorkflowDetailPresenter.loadWorkflowDetail(id);%0A%0A        return rootView;%0A    %7D%0A%0A    @Override%0A    public void showProgressbar(boolean b) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void showWorkflowDetail(DetailWorkflow detailWorkflow) %7B%0A%0A        uploaderName.setText(detailWorkflow.getUploader().getContent());%0A        date.setText(detailWorkflow.getUpdatedAt());%0A        type.setText(detailWorkflow.getType().getContent());%0A        title.setText(detailWorkflow.getTitle());%0A        description.loadData(detailWorkflow.getDescription(), %22text/html%22, %22utf-8%22);%0A%0A        Glide.with(getContext())%0A                .load(detailWorkflow.getPreviewUri())%0A                .diskCacheStrategy(DiskCacheStrategy.SOURCE)%0A                .placeholder(R.drawable.placeholder)%0A                .error(R.drawable.placeholder)%0A                .into(workflowImage);%0A    %7D%0A%0A    @Override%0A    public void onDestroyView() %7B%0A        super.onDestroyView();%0A        mWorkflowDetailPresenter.detachView();%0A    %7D%0A%7D%0A

add workflow detail fragment