You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by sagar15795 <gi...@git.apache.org> on 2016/07/19 06:23:51 UTC

[GitHub] incubator-taverna-mobile pull request #23: Favourite Workflow-detail design

GitHub user sagar15795 opened a pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/23

    Favourite Workflow-detail design 

    I have implemented the same Detail layout functionality  as I show in the dashboard.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sagar15795/incubator-taverna-mobile DetailFavourite

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-taverna-mobile/pull/23.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #23
    
----
commit 6aa8fc1c5e69236b02fe327d4a6264a450a95795
Author: Sagar <ku...@gmail.com>
Date:   2016-07-16T18:01:25Z

    add method in dbHelper

commit ffa7e224f18deb32ed00e9a09a6f942d4950573a
Author: Sagar <ku...@gmail.com>
Date:   2016-07-16T18:04:30Z

    add method in data manger to get favourite workflow detail

commit 05540b14801e7ee8c1df8a1e76de8c14a6406cab
Author: Sagar <ku...@gmail.com>
Date:   2016-07-18T19:06:34Z

    Add Favourite workflow detail activity

commit 2b02be8735aaca7b7c9de2102771b556637c5176
Author: Sagar <ku...@gmail.com>
Date:   2016-07-18T19:07:16Z

    Add Favourite workflow detail MvpView & Presenter

commit c12ab5782868a5d0394bcb352ca644719cae4f72
Author: Sagar <ku...@gmail.com>
Date:   2016-07-18T19:07:49Z

    Add Favourite workflow detail Fragment

commit cec96be583333f66feb9552506d347856d34a823
Author: Sagar <ku...@gmail.com>
Date:   2016-07-18T19:08:09Z

    Add Favourite workflow detail Activity in manifest

commit 47182e0baa6522f604889980bd2a93b11c36e0f4
Author: Sagar <ku...@gmail.com>
Date:   2016-07-18T19:10:04Z

    add onItemTouchListener for recycler view

commit adb71d459adae081de25cb46202c1c4e9cc84f50
Author: Sagar <ku...@gmail.com>
Date:   2016-07-19T06:13:10Z

    remove checkstyle error

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #23: Favourite Workflow-detail design

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/23#discussion_r71683278
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/favouriteworkflow/FavouriteWorkflowsFragment.java ---
    @@ -121,12 +139,25 @@ public void onClick(View view) {
         @Override
         public void showWorkflows(List<Workflow> workflowList) {
     
    -        mFavouriteWorkflowsAdapter = new FavouriteWorkflowsAdapter(workflowList, getContext());
    -        mRecyclerView.setAdapter(mFavouriteWorkflowsAdapter);
    +        mWorkflowList.addAll(workflowList);
    +        mFavouriteWorkflowsAdapter.notifyDataSetChanged();
         }
     
         @Override
         public void showEmptyWorkflow() {
             tvNoWorkflowError.setVisibility(View.VISIBLE);
         }
    +
    +    @Override
    +    public void onItemClick(View childView, int position) {
    +        Intent intent = new Intent(getActivity(), FavouriteWorkflowDetailActivity.class);
    +        intent.putExtra("id", mWorkflowList.get(position).getId());
    --- End diff --
    
    Make  public static variable of  putExtra string argument in this class. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #23: Favourite Workflow-detail design

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/23#discussion_r71682950
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/favouriteworkflow/FavouriteWorkflowsFragment.java ---
    @@ -80,12 +90,18 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle
     
             mFavouriteWorkflowsPresenter.attachView(this);
     
    +        mFavouriteWorkflowsAdapter = new FavouriteWorkflowsAdapter(mWorkflowList, getContext());
    +
             final LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
     
             mRecyclerView.setLayoutManager(layoutManager);
             mRecyclerView.setItemAnimator(new DefaultItemAnimator());
             mRecyclerView.hasFixedSize();
     
    +        mRecyclerView.addOnItemTouchListener(new RecyclerItemClickListner(getActivity(), this));
    +
    +        mRecyclerView.setAdapter(mFavouriteWorkflowsAdapter);
    +
             showProgressbar(true);
    --- End diff --
    
    move this call to Presenter


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #23: Favourite Workflow-detail design

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/23#discussion_r71683707
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/favouriteworkflowdetail/FavouriteWorkflowDetailPresenter.java ---
    @@ -0,0 +1,211 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.ui.favouriteworkflowdetail;
    +
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.data.model.License;
    +import org.apache.taverna.mobile.data.model.User;
    +import org.apache.taverna.mobile.data.model.Workflow;
    +import org.apache.taverna.mobile.ui.base.BasePresenter;
    +
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import rx.Observer;
    +import rx.Subscription;
    +import rx.android.schedulers.AndroidSchedulers;
    +import rx.schedulers.Schedulers;
    +
    +public class FavouriteWorkflowDetailPresenter extends
    +        BasePresenter<FavouriteWorkflowDetailMvpView> {
    +
    +    public final String LOG_TAG = getClass().getSimpleName();
    +    private DataManager mDataManager;
    +    private Subscription mSubscriptions;
    +
    +
    +    public FavouriteWorkflowDetailPresenter(DataManager dataManager) {
    +        mDataManager = dataManager;
    +    }
    +
    +    @Override
    +    public void attachView(FavouriteWorkflowDetailMvpView mvpView) {
    +        super.attachView(mvpView);
    +    }
    +
    +    @Override
    +    public void detachView() {
    +        super.detachView();
    +        if (mSubscriptions != null) mSubscriptions.unsubscribe();
    +    }
    +
    +    public void loadWorkflowDetail(String id) {
    +        getMvpView().showProgressbar(true);
    +
    +        mSubscriptions = mDataManager.getFavoriteDetailWorkflow(id)
    --- End diff --
    
    you are subscribing more than one time to Subscription, So replace Subscription to CompositeSubscription.
    For Example : https://github.com/openMF/android-client/blob/master/mifosng-android/src/main/java/com/mifos/mifosxdroid/offline/syncclientpayloads/SyncClientPayloadsPresenter.java


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #23: Favourite Workflow-detail design

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-taverna-mobile/pull/23


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---