You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by Hiteshgautam01 <gi...@git.apache.org> on 2018/03/01 08:21:59 UTC

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

GitHub user Hiteshgautam01 opened a pull request:

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

    Fix: Replace usage dialogue box with New Usage Activity

    Please make sure these boxes are checked before submitting your pull request - thanks!
    
    - [ ] Apply the `AndroidStyle.xml` style template to your code in Android Studio.
    
    - [ ] Run the checks with `./gradlew check` to make sure you didn't break anything
    
    - [ ] If you have multiple commits please combine them into one commit by squashing them.

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

    $ git pull https://github.com/Hiteshgautam01/incubator-taverna-mobile FixUsage

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

    https://github.com/apache/incubator-taverna-mobile/pull/65.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 #65
    
----
commit a129fb76a35b20eea3020f6f2a3ebd6b4951966c
Author: Hitesh Gautam <ga...@...>
Date:   2018-03-01T07:44:40Z

    Fix: Replace usage dialogue box with New Usage Activity

----


---

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

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

    https://github.com/apache/incubator-taverna-mobile/pull/65#discussion_r171501140
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java ---
    @@ -163,10 +163,8 @@ public boolean onNavigationItemSelected(MenuItem menuItem) {
     
                                 case R.id.nav_usage:
     
    -                                dialog.setCanceledOnTouchOutside(true);
    -                                dialog.setTitle(getString(R.string.title_nav_usage));
    -                                dialog.setContentView(R.layout.usage_layout);
    -                                dialog.show();
    +                                Intent i = new Intent(DashboardActivity.this, UsageActivity.class);
    --- End diff --
    
    use `intent` instead of `i`


---

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

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

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


---

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

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

    https://github.com/apache/incubator-taverna-mobile/pull/65#discussion_r171493890
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/usage/UsageActivity.java ---
    @@ -0,0 +1,62 @@
    +/*
    + * 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.usage;
    +
    +import android.support.v7.app.ActionBar;
    +import android.support.v7.app.AppCompatActivity;
    +import android.os.Bundle;
    +import android.support.v7.widget.Toolbar;
    +import android.view.MenuItem;
    +
    +import org.apache.taverna.mobile.R;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +
    +public class UsageActivity extends AppCompatActivity {
    +
    +    @BindView(R.id.toolbar)
    +    Toolbar mToolbar;
    +
    +    @Override
    +    protected void onCreate(Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +        setContentView(R.layout.activity_usage2);
    --- End diff --
    
    @Hiteshgautam01 layout name should be `activity_usage` only. Why usage2? 


---

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

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

    https://github.com/apache/incubator-taverna-mobile/pull/65#discussion_r171752317
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java ---
    @@ -163,10 +163,8 @@ public boolean onNavigationItemSelected(MenuItem menuItem) {
     
                                 case R.id.nav_usage:
     
    -                                dialog.setCanceledOnTouchOutside(true);
    -                                dialog.setTitle(getString(R.string.title_nav_usage));
    -                                dialog.setContentView(R.layout.usage_layout);
    -                                dialog.show();
    +                                Intent intent = new Intent(DashboardActivity.this, UsageActivity.class);
    --- End diff --
    
    @Hiteshgautam01 Checkstyle rule is failing here.


---

[GitHub] incubator-taverna-mobile pull request #65: Fix: Replace usage dialogue box w...

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

    https://github.com/apache/incubator-taverna-mobile/pull/65#discussion_r171501902
  
    --- Diff: app/src/main/res/layout/activity_usage.xml ---
    @@ -0,0 +1,179 @@
    +<?xml version="1.0" encoding="utf-8"?>
    +<!--
    +   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.
    +-->
    +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    +    android:layout_width="match_parent"
    +    android:layout_height="match_parent"
    +    android:orientation="vertical">
    +
    +    <android.support.v7.widget.Toolbar
    --- End diff --
    
    @Hiteshgautam01 This is not required here. You just need to include `appbar.xml` layout file here. appbar.xml file already have Toolbar defined. 


---