You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by ia...@apache.org on 2015/07/27 12:05:43 UTC
[06/18] incubator-taverna-mobile git commit: implemented workflow run
history
implemented workflow run history
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/0c53f1c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/0c53f1c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/0c53f1c5
Branch: refs/heads/master
Commit: 0c53f1c5a217fe61196f1dd5a6344b95e75ba64b
Parents: 4c0448b
Author: larrytech7 <la...@gmail.com>
Authored: Sun Jul 19 13:56:56 2015 +0100
Committer: larrytech7 <la...@gmail.com>
Committed: Sun Jul 19 13:56:56 2015 +0100
----------------------------------------------------------------------
.../workflowdetails/WorkflowRunHistoryFragment.java | 10 ++++++++++
app/src/main/res/layout/fragment_workflow_run_history.xml | 2 +-
app/src/main/res/values/strings.xml | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/0c53f1c5/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowRunHistoryFragment.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowRunHistoryFragment.java b/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowRunHistoryFragment.java
index d879105..c0b01cf 100644
--- a/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowRunHistoryFragment.java
+++ b/app/src/main/java/org/apache/taverna/mobile/fragments/workflowdetails/WorkflowRunHistoryFragment.java
@@ -34,6 +34,7 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.TextView;
import org.apache.taverna.mobile.R;
import org.apache.taverna.mobile.adapters.RunAdapter;
@@ -55,6 +56,7 @@ public class WorkflowRunHistoryFragment extends Fragment implements LoaderManage
private static final String ARG_PARAM2 = "param2";
private ProgressDialog progressDialog;
private RecyclerView mRecyclerView;
+ private TextView emptyRunHistoryTextView;
private RunAdapter runAdapter;
private static String workflowID; //represents a run name that matches the given workflow
@@ -103,6 +105,7 @@ public class WorkflowRunHistoryFragment extends Fragment implements LoaderManage
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView =inflater.inflate(R.layout.fragment_workflow_run_history, container, false);
+ emptyRunHistoryTextView = (TextView) rootView.findViewById(android.R.id.empty);
mRecyclerView = (RecyclerView) rootView.findViewById(android.R.id.list);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
@@ -141,6 +144,13 @@ public class WorkflowRunHistoryFragment extends Fragment implements LoaderManage
public void onLoadFinished(Loader<Workflow> workflowLoader, Workflow workflow) {
runAdapter.setRunList(workflow.getWorkflow_runs());
mRecyclerView.setAdapter(runAdapter);
+ if(runAdapter.getRunList().size() ==0){
+ mRecyclerView.setVisibility(View.GONE);
+ emptyRunHistoryTextView.setVisibility(View.VISIBLE);
+ }else{
+ mRecyclerView.setVisibility(View.VISIBLE);
+ emptyRunHistoryTextView.setVisibility(View.GONE);
+ }
// progressDialog.dismiss();
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/0c53f1c5/app/src/main/res/layout/fragment_workflow_run_history.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/layout/fragment_workflow_run_history.xml b/app/src/main/res/layout/fragment_workflow_run_history.xml
index 924df05..b1d075f 100644
--- a/app/src/main/res/layout/fragment_workflow_run_history.xml
+++ b/app/src/main/res/layout/fragment_workflow_run_history.xml
@@ -39,6 +39,6 @@ limitations under the License.
android:layout_height="wrap_content"
android:gravity="center"
android:visibility="gone"
- android:text="@string/workflow_empty"/>
+ android:text="@string/workflow_run_empty"/>
</FrameLayout>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/0c53f1c5/app/src/main/res/values/strings.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index eda8079..baee94b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -57,6 +57,7 @@ limitations under the License.
<string name="workflow_component">Workflow component</string>
<string name="favorite_empty"> No Favorites Added Yet</string>
<string name="workflow_empty"> No <b>Workflows</b> Available. Check your Connection to the Internet or Pull down to refresh</string>
+ <string name="workflow_run_empty"> <b>Workflows History</b> empty. No runs have been created for this workflow</string>
<string name="wktitle">TITLE</string>
<string name="marked">Marked On</string>
<string name="created">Created :</string>