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/02/27 09:55:55 UTC
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
GitHub user Hiteshgautam01 opened a pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61
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 Usage_activity
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-taverna-mobile/pull/61.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 #61
----
commit b782fc3255e45262f4b350f17df6c550b32d8d57
Author: Hitesh Gautam <ga...@...>
Date: 2018-02-27T09:32:54Z
Fix: Replace usage dialoge box with new usage activity
commit 6dea687d054d641b379a85da85f4abe491ae251e
Author: Hitesh Gautam <ga...@...>
Date: 2018-02-27T09:48:20Z
Fix: Replace usage dialoge box with New usage activity
----
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170982716
--- Diff: app/src/main/res/layout/activity_usage.xml ---
@@ -0,0 +1,178 @@
+<?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
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize" />
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="10dp">
+
+ <android.support.v7.widget.CardView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="10dp">
--- End diff --
Move this to `dimens.xml` file
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170983045
--- Diff: app/src/main/res/layout/activity_usage.xml ---
@@ -0,0 +1,178 @@
+<?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
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize" />
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="10dp">
+
+ <android.support.v7.widget.CardView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="10dp">
+
+ <TextView
+ android:id="@+id/textView16"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:paddingTop="3dp"
--- End diff --
Move this to `dimens.xml` file
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170988574
--- Diff: app/src/main/res/values/strings.xml ---
@@ -187,7 +186,6 @@ limitations under the License.
<string name="sign_out_message">Do you really want to sign out?</string>
-
--- End diff --
why have you done this?
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170990248
--- Diff: app/src/main/AndroidManifest.xml ---
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
--- End diff --
Revert all unwanted changes. Change only that line which is required
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170989754
--- Diff: app/build.gradle ---
@@ -86,6 +86,7 @@ dependencies {
//Dependencies for butterknife
implementation "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
--- End diff --
remove this unused library
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170982955
--- Diff: app/src/main/res/layout/activity_usage.xml ---
@@ -0,0 +1,178 @@
+<?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
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize" />
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="10dp">
+
+ <android.support.v7.widget.CardView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="10dp">
+
+ <TextView
+ android:id="@+id/textView16"
--- End diff --
use a meaningful name.
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170978627
--- Diff: app/build.gradle ---
@@ -86,6 +86,7 @@ dependencies {
//Dependencies for butterknife
implementation "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
+ implementation 'com.android.support.constraint:constraint-layout:1.0.2'
--- End diff --
Remove this unused library
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170988515
--- Diff: app/src/main/res/values/strings.xml ---
@@ -106,8 +106,7 @@ limitations under the License.
The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
</string>
<string name="about2">View, run and download workflows on your Android mobile device.</string>
- <string name="about3">Originally developed during Google Summer of Code 2015 for the<a
- href="http://taverna.incubator.apache.org">Apache Taverna project</a>.
+ <string name="about3">Originally developed during Google Summer of Code 2015 for the<a href="http://taverna.incubator.apache.org">Apache Taverna project</a>.
--- End diff --
why have you done this?
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170983254
--- Diff: app/src/main/res/layout/activity_usage.xml ---
@@ -0,0 +1,178 @@
+<?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
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize" />
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="10dp">
+
+ <android.support.v7.widget.CardView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="10dp">
+
+ <TextView
+ android:id="@+id/textView16"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:paddingTop="3dp"
+ android:text="@string/usage_intro"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="#3C90DA"
+ android:textSize="25dp" />
--- End diff --
Move this to `dimens.xml` file.
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170980694
--- Diff: app/src/main/res/menu/drawer_view.xml ---
@@ -35,11 +35,11 @@
android:id="@+id/nav_announcement"
android:icon="@drawable/ic_announcement_black_24dp"
android:title="@string/title_nav_announcement"/>
- </group>
--- End diff --
why have you done this?
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170987076
--- 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_usage);
+ ButterKnife.bind(this);
+
+ setSupportActionBar(mToolbar);
+ ActionBar actionbar = getSupportActionBar();
+
+ if (actionbar != null) {
+ actionbar.setHomeButtonEnabled(true);
+ actionbar.setDisplayHomeAsUpEnabled(true);
+ actionbar.setTitle(R.string.title_usage);
+ }
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case android.R.id.home:
+ finish();
--- End diff --
It will be good if you will use [Google guidelines](https://developer.android.com/training/implementing-navigation/ancestral.html) for up navigation.
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by Hiteshgautam01 <gi...@git.apache.org>.
Github user Hiteshgautam01 closed the pull request at:
https://github.com/apache/incubator-taverna-mobile/pull/61
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170993220
--- Diff: app/src/main/res/menu/drawer_view.xml ---
@@ -35,11 +35,11 @@
android:id="@+id/nav_announcement"
android:icon="@drawable/ic_announcement_black_24dp"
android:title="@string/title_nav_announcement"/>
- </group>
--- End diff --
revert this because this will allow usages nav item to be checkable and this is not required.
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by Hiteshgautam01 <gi...@git.apache.org>.
Github user Hiteshgautam01 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170987136
--- Diff: app/src/main/res/menu/drawer_view.xml ---
@@ -35,11 +35,11 @@
android:id="@+id/nav_announcement"
android:icon="@drawable/ic_announcement_black_24dp"
android:title="@string/title_nav_announcement"/>
- </group>
--- End diff --
for systematic order because after this group all are in dialogue boxes. So i shifted usage activity to the above group
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170982595
--- Diff: app/src/main/res/layout/activity_usage.xml ---
@@ -0,0 +1,178 @@
+<?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
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:minHeight="?attr/actionBarSize" />
+
+ <android.support.v4.widget.NestedScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="10dp">
--- End diff --
Move this to `dimens.xml` file
---
[GitHub] incubator-taverna-mobile pull request #61: Fix: Replace usage dialogue box w...
Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/61#discussion_r170979320
--- Diff: app/src/main/AndroidManifest.xml ---
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
--- End diff --
Revert all unwanted changes from this file. Change only that line which is required.
---