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/24 15:05:50 UTC

[GitHub] incubator-taverna-mobile pull request #24: Image zoom feature for workflow i...

GitHub user sagar15795 opened a pull request:

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

    Image zoom feature for workflow image

    I have added image zooming feature to zoom workflow image by clicking on it .
    
    I have added it to both Favourite workflow detail activity and workflow detail activity

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

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

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

    https://github.com/apache/incubator-taverna-mobile/pull/24.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 #24
    
----
commit 625879214928165ff6c1f29b8036731399deefce
Author: Sagar <ku...@gmail.com>
Date:   2016-07-23T05:31:17Z

    add zoom image activity layout

commit 6a484b83fa5bd98ee70d698b9edb7843867d817a
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:49:22Z

    add method in DBHelper for getting all URL

commit bb6c3fac321d056a0deb93c98ca78eac5acf53d1
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:50:18Z

    add method in DataManger for getting all URL from DBHelper

commit a69e8a0016f0bdf0bfcc6aac6f422b59e3711d18
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:50:49Z

    add image zoom activity

commit 1e01f64687d1f6e12e9934012639b6e569abd944
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:51:17Z

    add image zoom activity in manifest

commit 1a62d23b6ccdc2c25cc04c675b087fa4555a2cf4
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:52:14Z

    add presenter for image zoom

commit 9b8b2e791cec9c9709bc7eff909f4632274bbed2
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:53:54Z

    add image zoom layout + clear icon

commit cb1384b24891d734a63c13ce387c028335f05549
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:54:38Z

    add PhotoView library for image zoom in and out

commit 7d6d86bfa38f3434dff1a94e7c2b5773ea88f307
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:55:22Z

    add image zoom fragment

commit 5f3c218d2c17aaa8ac96919e634a0b2e574e3a67
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T13:58:35Z

    add onClick event on workflow image  for zooming the image

commit 8dbb7f9175a3e07efeae40ed3533c92985bc9fd0
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T14:41:25Z

    remove checkstyle error

commit b131f9efff0981e9bf099511725c24295049c304
Author: Sagar <ku...@gmail.com>
Date:   2016-07-24T14:58:57Z

    add licence header

----


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72050144
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/imagezoom/ImageZoomFragment.java ---
    @@ -0,0 +1,246 @@
    +/*
    + * 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.imagezoom;
    +
    +
    +import android.content.Context;
    +import android.graphics.drawable.Drawable;
    +import android.os.Bundle;
    +import android.os.Handler;
    +import android.support.annotation.Nullable;
    +import android.support.design.widget.Snackbar;
    +import android.support.v4.app.Fragment;
    +import android.view.LayoutInflater;
    +import android.view.View;
    +import android.view.ViewGroup;
    +import android.widget.ImageView;
    +
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +import com.bumptech.glide.load.resource.drawable.GlideDrawable;
    +import com.bumptech.glide.request.Request;
    +import com.bumptech.glide.request.animation.GlideAnimation;
    +import com.bumptech.glide.request.target.SizeReadyCallback;
    +import com.bumptech.glide.request.target.Target;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.utils.ConnectionInfo;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +import butterknife.OnClick;
    +import uk.co.senab.photoview.PhotoViewAttacher;
    +
    +public class ImageZoomFragment extends Fragment implements ImageZoomMvpView {
    +
    +    public static final String JPG_URI = "jpgURI";
    +
    +    public static final String SVG_URI = "svgURI";
    +
    +    private static final String SERVER_ERROR = "Sever Error. Please try after sometime";
    +
    +    private static final String TAG = "ImageZoomFragment";
    +
    +    @BindView(R.id.ivWorkflowImage)
    +    ImageView workflowImage;
    +    @BindView(R.id.ivClose)
    --- End diff --
    
    One Line Space


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72050248
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/imagezoom/ImageZoomFragment.java ---
    @@ -0,0 +1,246 @@
    +/*
    + * 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.imagezoom;
    +
    +
    +import android.content.Context;
    +import android.graphics.drawable.Drawable;
    +import android.os.Bundle;
    +import android.os.Handler;
    +import android.support.annotation.Nullable;
    +import android.support.design.widget.Snackbar;
    +import android.support.v4.app.Fragment;
    +import android.view.LayoutInflater;
    +import android.view.View;
    +import android.view.ViewGroup;
    +import android.widget.ImageView;
    +
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +import com.bumptech.glide.load.resource.drawable.GlideDrawable;
    +import com.bumptech.glide.request.Request;
    +import com.bumptech.glide.request.animation.GlideAnimation;
    +import com.bumptech.glide.request.target.SizeReadyCallback;
    +import com.bumptech.glide.request.target.Target;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.utils.ConnectionInfo;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +import butterknife.OnClick;
    +import uk.co.senab.photoview.PhotoViewAttacher;
    +
    +public class ImageZoomFragment extends Fragment implements ImageZoomMvpView {
    +
    +    public static final String JPG_URI = "jpgURI";
    +
    +    public static final String SVG_URI = "svgURI";
    +
    +    private static final String SERVER_ERROR = "Sever Error. Please try after sometime";
    +
    +    private static final String TAG = "ImageZoomFragment";
    +
    +    @BindView(R.id.ivWorkflowImage)
    +    ImageView workflowImage;
    +    @BindView(R.id.ivClose)
    +    ImageView close;
    +
    +    PhotoViewAttacher mAttacher;
    +
    +    private String svgURI;
    +
    +    private String jpgURI;
    +
    +    private DataManager dataManager;
    --- End diff --
    
    Remove unused variables


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72049628
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/favouriteworkflowdetail/FavouriteWorkflowDetailFragment.java ---
    @@ -50,58 +41,53 @@
     import android.widget.ScrollView;
     import android.widget.TextView;
     
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +
    +import org.apache.taverna.mobile.R;
    +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.imagezoom.ImageZoomActivity;
    +import org.apache.taverna.mobile.ui.imagezoom.ImageZoomFragment;
    +import org.apache.taverna.mobile.utils.ConnectionInfo;
    +
     import butterknife.BindView;
     import butterknife.ButterKnife;
     import butterknife.OnClick;
     
     public class FavouriteWorkflowDetailFragment extends Fragment
             implements FavouriteWorkflowDetailMvpView {
     
    +    private static final String ID = "id";
    --- End diff --
    
    Give one line space


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72050819
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/imagezoom/ImageZoomPresenter.java ---
    @@ -0,0 +1,167 @@
    +/*
    + * 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.imagezoom;
    +
    +
    +import android.graphics.drawable.Drawable;
    +import android.graphics.drawable.PictureDrawable;
    +import android.net.Uri;
    +import android.os.Build;
    +import android.widget.ImageView;
    +
    +import com.bumptech.glide.GenericRequestBuilder;
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +import com.bumptech.glide.load.model.StreamEncoder;
    +import com.bumptech.glide.load.resource.file.FileToStreamDecoder;
    +import com.bumptech.glide.request.Request;
    +import com.bumptech.glide.request.animation.GlideAnimation;
    +import com.bumptech.glide.request.target.SizeReadyCallback;
    +import com.bumptech.glide.request.target.Target;
    +import com.caverock.androidsvg.SVG;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.ui.base.BasePresenter;
    +import org.apache.taverna.mobile.utils.SvgDecoder;
    +import org.apache.taverna.mobile.utils.SvgDrawableTranscoder;
    +
    +import java.io.InputStream;
    +
    +import rx.Subscription;
    +
    +public class ImageZoomPresenter extends BasePresenter<ImageZoomMvpView> {
    +
    +    public static final String NO_IMAGE_URI = "NO Image Found";
    +    public static final String DB_ERROR = "There is some problem. Please try after sometime ";
    +    private DataManager mDataManager;
    +    private Subscription mSubscriptions;
    --- End diff --
    
    Remove these unused variables


---
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 #24: Image zoom feature for workflow i...

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

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


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72049478
  
    --- Diff: app/src/main/AndroidManifest.xml ---
    @@ -119,6 +119,11 @@ limitations under the License.
                     android:name="android.support.PARENT_ACTIVITY"
                     android:value="org.apache.taverna.mobile.activities.DashboardMainActivity"/>
             </activity>
    +
    +        <activity android:name=".ui.imagezoom.ImageZoomActivity"
    +                  android:label="Image Zoom"
    --- End diff --
    
    Put this String In strings.xml


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72050111
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/imagezoom/ImageZoomFragment.java ---
    @@ -0,0 +1,246 @@
    +/*
    + * 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.imagezoom;
    +
    +
    +import android.content.Context;
    +import android.graphics.drawable.Drawable;
    +import android.os.Bundle;
    +import android.os.Handler;
    +import android.support.annotation.Nullable;
    +import android.support.design.widget.Snackbar;
    +import android.support.v4.app.Fragment;
    +import android.view.LayoutInflater;
    +import android.view.View;
    +import android.view.ViewGroup;
    +import android.widget.ImageView;
    +
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +import com.bumptech.glide.load.resource.drawable.GlideDrawable;
    +import com.bumptech.glide.request.Request;
    +import com.bumptech.glide.request.animation.GlideAnimation;
    +import com.bumptech.glide.request.target.SizeReadyCallback;
    +import com.bumptech.glide.request.target.Target;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.utils.ConnectionInfo;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +import butterknife.OnClick;
    +import uk.co.senab.photoview.PhotoViewAttacher;
    +
    +public class ImageZoomFragment extends Fragment implements ImageZoomMvpView {
    +
    +    public static final String JPG_URI = "jpgURI";
    +
    +    public static final String SVG_URI = "svgURI";
    +
    +    private static final String SERVER_ERROR = "Sever Error. Please try after sometime";
    +
    +    private static final String TAG = "ImageZoomFragment";
    --- End diff --
    
    remove static and use getClass.getSimpleName for getting class name for Log Tag


---
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 #24: Image zoom feature for workflow i...

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/24#discussion_r72049990
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/imagezoom/ImageZoomActivity.java ---
    @@ -0,0 +1,50 @@
    +/*
    + * 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.imagezoom;
    +
    +
    +import android.os.Bundle;
    +import android.support.annotation.Nullable;
    +import android.support.v7.app.AppCompatActivity;
    +
    +import org.apache.taverna.mobile.R;
    +
    +import butterknife.ButterKnife;
    +
    +public class ImageZoomActivity extends AppCompatActivity {
    +
    +    @Override
    +    protected void onCreate(@Nullable Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +        setContentView(R.layout.activity_image_zoom);
    +
    +        ButterKnife.bind(this);
    +
    +
    +        if (savedInstanceState == null) {
    +            getSupportFragmentManager().beginTransaction()
    +                    .add(R.id.frame_container
    --- End diff --
    
    Use Utils ActivityUtils for fragment transaction 


---
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.
---