You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by sa...@apache.org on 2016/11/03 16:12:13 UTC
[1/8] incubator-taverna-mobile git commit: HTML web view for licences
in a dialog fragment
Repository: incubator-taverna-mobile
Updated Branches:
refs/heads/master 990eb0df2 -> a0033e70b
HTML web view for licences in a dialog fragment
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/bcdba791
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/bcdba791
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/bcdba791
Branch: refs/heads/master
Commit: bcdba791c6d3f5acc65471c495d628e4a1db5b3e
Parents: f33900e
Author: Ian Dunlop <ia...@manchester.ac.uk>
Authored: Wed Nov 2 16:15:54 2016 +0000
Committer: Ian Dunlop <ia...@manchester.ac.uk>
Committed: Wed Nov 2 16:15:54 2016 +0000
----------------------------------------------------------------------
app/src/main/assets/licences.html | 333 +++++++++++++++++++
.../taverna/mobile/ui/DashboardActivity.java | 11 +-
.../ui/adapter/LicenceRecyclerViewAdapter.java | 88 -----
.../mobile/ui/licence/LicenceFragment.java | 84 +----
app/src/main/res/layout/fragment_licence.xml | 83 +----
5 files changed, 364 insertions(+), 235 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bcdba791/app/src/main/assets/licences.html
----------------------------------------------------------------------
diff --git a/app/src/main/assets/licences.html b/app/src/main/assets/licences.html
new file mode 100644
index 0000000..166bbcd
--- /dev/null
+++ b/app/src/main/assets/licences.html
@@ -0,0 +1,333 @@
+<html>
+
+<head>
+ <style>
+ body {
+ font-family: sans-serif;
+ }
+ pre {
+ background-color: #eeeeee;
+ padding: 1em;
+ white-space: pre-wrap;
+ }
+ </style>
+</head>
+
+<body>
+
+<b>Glide</b>
+ <pre>
+License for everything not in third_party and not otherwise marked:
+
+Copyright 2014 Google, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ of conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of Google, Inc.
+---------------------------------------------------------------------------------------------
+License for third_party/disklrucache:
+
+Copyright 2012 Jake Wharton
+Copyright 2011 The Android Open Source Project
+
+Licensed 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.
+---------------------------------------------------------------------------------------------
+License for third_party/gif_decoder:
+
+Copyright (c) 2013 Xcellent Creations, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+---------------------------------------------------------------------------------------------
+License for third_party/gif_encoder/AnimatedGifEncoder.java and
+third_party/gif_encoder/LZWEncoder.java:
+
+No copyright asserted on the source code of this class. May be used for any
+purpose, however, refer to the Unisys LZW patent for restrictions on use of
+the associated LZWEncoder class. Please forward any corrections to
+kweiner@fmsware.com.
+
+-----------------------------------------------------------------------------
+License for third_party/gif_encoder/NeuQuant.java
+
+Copyright (c) 1994 Anthony Dekker
+
+NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See
+"Kohonen neural networks for optimal colour quantization" in "Network:
+Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of
+the algorithm.
+
+Any party obtaining a copy of these files from the author, directly or
+indirectly, is granted, free of charge, a full and unrestricted irrevocable,
+world-wide, paid up, royalty-free, nonexclusive right and license to deal in
+this software and documentation files (the "Software"), including without
+limitation the rights to use, copy, modify, merge, publish, distribute,
+sublicense, and/or sell copies of the Software, and to permit persons who
+receive copies from any such party to do so, with the only requirement being
+that this copyright notice remain intact.
+</pre>
+
+<b>appcompat</b>, <b>cardview</b>, <b>recyclerview</b>, <b>support</b>, <b>design</b>, <b>multidex</b>, <b>Gson</b>
+ <pre>
+Copyright 2008 Google, Inc.
+
+Licensed 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.
+</pre>
+
+<b>Retrofit</b>, <b>RXJava Adapter</b>
+ <pre>
+Copyright 2013 Square, Inc.
+
+Licensed 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.
+</pre>
+
+<b>OKHttp</b>, <b>Logging Interceptor</b>, <b>Simple XML Converter</b>
+ <pre>
+Copyright 2014 Square, Inc.
+
+Licensed 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.
+</pre>
+<b>Butterknife</b>, <b>Butterknife Compiler</b>
+ <pre>
+Copyright 2013 Jake Wharton
+
+Licensed 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.
+</pre>
+<b>RxAndroid</b>
+ <pre>
+Copyright 2015 The RxAndroid authors
+
+Licensed 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.
+</pre>
+<b>RxJava</b>
+ <pre>
+Copyright 2013 Netflix, Inc.
+
+Licensed 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.
+</pre>
+<b>Simple XML</b>
+ <pre>
+Copyright unknown
+
+Licensed 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.
+</pre>
+<b>Android SVG</b>
+ <pre>
+Copyright unknown
+
+Licensed 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.
+</pre>
+
+<b>Photo View</b>
+ <pre>
+Copyright 2016 Chris Banes
+
+Licensed 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.
+</pre>
+
+<b>Steps View</b>
+ <pre>
+Copyright 2015 Anton Nurdin Tuhadiansyah
+
+Licensed 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.
+</pre>
+
+<b>DBFlow</b>, <b>DBFlow Processor</b>, <b>DBDlow Core</b>
+ <pre>
+Copyright (c) 2014 Raizlabs
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+</pre>
+<b>Stetho</b>, <b>Stetho OKHttp</b>
+ <pre>
+Copyright (c) 2015, Facebook, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ * Neither the name Facebook nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bcdba791/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
index a546498..7d84074 100644
--- a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
@@ -18,7 +18,10 @@
*/
package org.apache.taverna.mobile.ui;
+import android.app.AlertDialog;
import android.app.Dialog;
+import android.app.FragmentManager;
+import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.NavigationView;
@@ -28,8 +31,10 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
+import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
+import android.webkit.WebView;
import android.widget.TableLayout;
import org.apache.taverna.mobile.R;
@@ -178,13 +183,15 @@ public class DashboardActivity extends AppCompatActivity {
return true;
case R.id.os_licences:
+ WebView view = (WebView) getLayoutInflater().inflate(R.layout.fragment_licence, navigationView, false);
+ view.loadUrl("file:///android_asset/licences.html");
+ LicenceFragment dialog = LicenceFragment.newInstance();
+ dialog.show(getSupportFragmentManager(), "LicenceDialog");
ActivityUtils.addFragmentToActivity(getSupportFragmentManager(),
LicenceFragment.newInstance(), R.id.frame_container);
- menuItem.setChecked(true);
mDrawerLayout.closeDrawers();
- toolbar.setTitle(R.string.title_nav_os_licences);
return true;
case R.id.nav_settings:
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bcdba791/app/src/main/java/org/apache/taverna/mobile/ui/adapter/LicenceRecyclerViewAdapter.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/adapter/LicenceRecyclerViewAdapter.java b/app/src/main/java/org/apache/taverna/mobile/ui/adapter/LicenceRecyclerViewAdapter.java
deleted file mode 100644
index 0a17dcf..0000000
--- a/app/src/main/java/org/apache/taverna/mobile/ui/adapter/LicenceRecyclerViewAdapter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.adapter;
-
-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.data.model.licence.LicenceContent;
-
-import java.util.List;
-
-/**
- * {@link RecyclerView.Adapter} that can display a {@link LicenceContent}
- */
-public class LicenceRecyclerViewAdapter extends RecyclerView.Adapter<LicenceRecyclerViewAdapter
- .ViewHolder> {
-
- private final List<LicenceContent> mValues;
-
- public LicenceRecyclerViewAdapter(List<LicenceContent> items) {
- mValues = items;
- }
-
- @Override
- public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
- View view = LayoutInflater.from(parent.getContext())
- .inflate(R.layout.fragment_licence, parent, false);
- return new ViewHolder(view);
- }
-
- @Override
- public void onBindViewHolder(final ViewHolder holder, int position) {
-
-
- holder.mLicenceNameView.setText(mValues.get(position).getName());
- holder.mLicenceVersionView.setText(mValues.get(position).getVersion());
- holder.mLicenceLicenceView.setText(mValues.get(position).getLicence());
-
-
- }
-
- @Override
- public int getItemCount() {
- return mValues.size();
- }
-
- public class ViewHolder extends RecyclerView.ViewHolder {
-
- private final TextView mLicenceNameView;
- private final TextView mLicenceVersionView;
- private final TextView mLicenceLicenceView;
-
-
- public ViewHolder(View view) {
- super(view);
- mLicenceNameView = (TextView) view.findViewById(R.id.licence_name);
- mLicenceVersionView = (TextView) view.findViewById(R.id.licence_version);
- mLicenceLicenceView = (TextView) view.findViewById(R.id.licence_licence);
- }
-
- @Override
- public String toString() {
- return super.toString() + " " + mLicenceNameView.getText() + " " +
- mLicenceVersionView.getText() + " " + mLicenceLicenceView.getText();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bcdba791/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java b/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
index 19ac78f..4bfefee 100644
--- a/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
@@ -18,88 +18,38 @@
*/
package org.apache.taverna.mobile.ui.licence;
-import android.content.Context;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.DialogInterface;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.util.Log;
+import android.support.annotation.NonNull;
+import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
+import android.webkit.WebView;
import org.apache.taverna.mobile.R;
-import org.apache.taverna.mobile.data.model.licence.LicenceContent;
-import org.apache.taverna.mobile.ui.adapter.LicenceRecyclerViewAdapter;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
/**
- * A fragment representing a list of Licence Items.
+ * A fragment displaying a dialog with the licence info.
*/
-public class LicenceFragment extends Fragment {
-
-
- private static final String TAG = LicenceFragment.class.getSimpleName();
+public class LicenceFragment extends DialogFragment {
- private Gson gson;
public static LicenceFragment newInstance() {
return new LicenceFragment();
}
+ @NonNull
@Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- gson = new Gson();
- }
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- return inflater.inflate(R.layout.fragment_licence_list, container, false);
- }
-
- @Override
- public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
-
- if (view instanceof RecyclerView) {
-
- Context context = view.getContext();
- RecyclerView recyclerView = (RecyclerView) view;
- recyclerView.setLayoutManager(new LinearLayoutManager(context));
- recyclerView.setAdapter(new LicenceRecyclerViewAdapter(loadJSONFromAsset()));
- }
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ WebView view = (WebView) LayoutInflater.from(getActivity()).inflate(R.layout.fragment_licence, null);
+ view.loadUrl("file:///android_asset/licences.html");
+ return new AlertDialog.Builder(getActivity(), R.style.Theme_AppCompat_Light_Dialog_Alert)
+ .setTitle(getString(R.string.title_nav_os_licences))
+ .setView(view)
+ .setPositiveButton(android.R.string.ok, null)
+ .create();
}
- private List<LicenceContent> loadJSONFromAsset() {
- String json = null;
- List<LicenceContent> itemList = null;
- try {
- InputStream is = getActivity().getAssets().open("licences.json");
- int size = is.available();
- byte[] buffer = new byte[size];
- is.read(buffer);
- is.close();
- json = new String(buffer, "UTF-8");
- } catch (IOException ex) {
- Log.i(TAG, IOException.class.getSimpleName());
- return null;
- }
- TypeToken<List<LicenceContent>> typeToken = new TypeToken<List<LicenceContent>>() {
- };
- itemList = gson.fromJson(json, typeToken.getType());
-
- return itemList;
- }
-
-
}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/bcdba791/app/src/main/res/layout/fragment_licence.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/layout/fragment_licence.xml b/app/src/main/res/layout/fragment_licence.xml
index a69f60d..df78320 100644
--- a/app/src/main/res/layout/fragment_licence.xml
+++ b/app/src/main/res/layout/fragment_licence.xml
@@ -15,81 +15,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:card_view="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/card_view"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/announcementCardMarginVertical"
- android:layout_marginRight="@dimen/announcementCardMarginHorizontal"
- android:layout_marginTop="@dimen/announcementCardMarginVertical"
- android:paddingBottom="5dp"
- card_view:cardCornerRadius="2dp"
- card_view:cardElevation="2pt">
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/licence_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:textAppearance="?attr/textAppearanceListItem"
- android:textStyle="bold"
- android:paddingBottom="5dp"/>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:paddingLeft="10dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="2"
- android:orientation="vertical">
- <TextView
- android:id="@+id/licence_version_text_holder"
- android:text="@string/os_licence_version_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?attr/textAppearanceListItem"
- android:textSize="14sp"
- android:textStyle="bold" />
- <TextView
- android:id="@+id/licence_version"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?attr/textAppearanceListItem" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="2"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/licence_licence_text_holder"
- android:text="@string/os_licence_licence_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?attr/textAppearanceListItem"
- android:textSize="14sp"
- android:textStyle="bold" />
-
- <TextView
- android:id="@+id/licence_licence"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?attr/textAppearanceListItem" />
- </LinearLayout>
-
- </LinearLayout>
- </LinearLayout>
-</android.support.v7.widget.CardView>
\ No newline at end of file
+<WebView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ />
\ No newline at end of file
[7/8] incubator-taverna-mobile git commit: remove checkstyle error
Posted by sa...@apache.org.
remove checkstyle error
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/e486eab5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/e486eab5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/e486eab5
Branch: refs/heads/master
Commit: e486eab5366265ae377e79c917b58b82e22f6c94
Parents: 87336a7
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 20:57:14 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 20:57:14 2016 +0530
----------------------------------------------------------------------
.../java/org/apache/taverna/mobile/ui/DashboardActivity.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/e486eab5/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
index 8c44069..c9fa3aa 100644
--- a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
@@ -188,8 +188,8 @@ public class DashboardActivity extends AppCompatActivity {
webView.getSettings().setUseWideViewPort(true);
webView.loadUrl("file:///android_asset/licences.html");
- AlertDialog alertDialog = new AlertDialog.Builder
- (DashboardActivity.this, R.style.Theme_Taverna_Dialog)
+ AlertDialog alertDialog = new AlertDialog.Builder(DashboardActivity
+ .this, R.style.Theme_Taverna_Dialog)
.setTitle(getString(R.string.title_nav_os_licences))
.setView(webView)
.setPositiveButton(android.R.string.ok, null)
[8/8] incubator-taverna-mobile git commit: Merge branch
'ian_licence_dialog_web_view'
Posted by sa...@apache.org.
Merge branch 'ian_licence_dialog_web_view'
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/a0033e70
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/a0033e70
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/a0033e70
Branch: refs/heads/master
Commit: a0033e70b24ccf9546dec55d1948bc1ff5dfe0e0
Parents: 990eb0d e486eab
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 21:41:56 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 21:41:56 2016 +0530
----------------------------------------------------------------------
app/src/main/assets/licences.html | 334 +++++++++++++++++++
app/src/main/assets/licences.json | 132 --------
.../data/model/licence/LicenceContent.java | 28 --
.../taverna/mobile/ui/DashboardActivity.java | 42 ++-
.../ui/adapter/LicenceRecyclerViewAdapter.java | 88 -----
.../mobile/ui/licence/LicenceFragment.java | 105 ------
app/src/main/res/layout/fragment_licence.xml | 83 +----
app/src/main/res/values/styles.xml | 2 +
8 files changed, 368 insertions(+), 446 deletions(-)
----------------------------------------------------------------------
[3/8] incubator-taverna-mobile git commit: add dialog theme
Posted by sa...@apache.org.
add dialog theme
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/648002cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/648002cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/648002cc
Branch: refs/heads/master
Commit: 648002cc47ca6b5e0fb13e6ddb40978620502052
Parents: df8cb04
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 20:38:28 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 20:38:28 2016 +0530
----------------------------------------------------------------------
app/src/main/res/values/styles.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/648002cc/app/src/main/res/values/styles.xml
----------------------------------------------------------------------
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index cea7952..34328de 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -32,4 +32,6 @@ limitations under the License.
<item name="android:orientation">vertical</item>
</style>
+ <style name="Theme.Taverna.Dialog" parent="Theme.AppCompat.Light.Dialog"/>
+
</resources>
[5/8] incubator-taverna-mobile git commit: add alert dialog for
licence
Posted by sa...@apache.org.
add alert dialog for licence
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/3c54df12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/3c54df12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/3c54df12
Branch: refs/heads/master
Commit: 3c54df12adddbe036c35fcba8e0b01f5bba1b0f4
Parents: 6296581
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 20:45:14 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 20:45:14 2016 +0530
----------------------------------------------------------------------
.../taverna/mobile/ui/DashboardActivity.java | 47 +++++++++++---------
1 file changed, 27 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/3c54df12/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
index 0ae64c8..8c44069 100644
--- a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
@@ -18,10 +18,8 @@
*/
package org.apache.taverna.mobile.ui;
-import android.app.AlertDialog;
+
import android.app.Dialog;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.NavigationView;
@@ -29,9 +27,9 @@ import android.support.v4.app.Fragment;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
+import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
-import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
@@ -43,7 +41,6 @@ import org.apache.taverna.mobile.data.DataManager;
import org.apache.taverna.mobile.data.local.PreferencesHelper;
import org.apache.taverna.mobile.ui.anouncements.AnnouncementFragment;
import org.apache.taverna.mobile.ui.favouriteworkflow.FavouriteWorkflowsFragment;
-import org.apache.taverna.mobile.ui.licence.LicenceFragment;
import org.apache.taverna.mobile.ui.login.LoginActivity;
import org.apache.taverna.mobile.ui.myworkflows.MyWorkflowFragment;
import org.apache.taverna.mobile.ui.workflow.WorkflowFragment;
@@ -64,7 +61,7 @@ public class DashboardActivity extends AppCompatActivity {
Toolbar toolbar;
- private Dialog aboutDialog;
+ private Dialog dialog;
private DataManager dataManager;
private Fragment fragment;
@@ -78,7 +75,8 @@ public class DashboardActivity extends AppCompatActivity {
setupDrawerContent(navigationView);
- aboutDialog = new Dialog(this);
+ dialog = new Dialog(this);
+
setSupportActionBar(toolbar);
final ActionBar ab = getSupportActionBar();
@@ -163,10 +161,10 @@ public class DashboardActivity extends AppCompatActivity {
case R.id.nav_usage:
- aboutDialog.setCanceledOnTouchOutside(true);
- aboutDialog.setTitle(getString(R.string.title_nav_usage));
- aboutDialog.setContentView(R.layout.usage_layout);
- aboutDialog.show();
+ dialog.setCanceledOnTouchOutside(true);
+ dialog.setTitle(getString(R.string.title_nav_usage));
+ dialog.setContentView(R.layout.usage_layout);
+ dialog.show();
mDrawerLayout.closeDrawers();
return true;
@@ -175,20 +173,29 @@ public class DashboardActivity extends AppCompatActivity {
TableLayout about = (TableLayout) getLayoutInflater().inflate(R
.layout.about, navigationView, false);
- aboutDialog.setCanceledOnTouchOutside(true);
- aboutDialog.setTitle(getString(R.string.title_nav_usage));
- aboutDialog.setContentView(about);
- aboutDialog.show();
+ dialog.setCanceledOnTouchOutside(true);
+ dialog.setTitle(getString(R.string.title_nav_usage));
+ dialog.setContentView(about);
+ dialog.show();
mDrawerLayout.closeDrawers();
return true;
case R.id.os_licences:
-
- LicenceFragment dialog = LicenceFragment.newInstance();
- dialog.show(getSupportFragmentManager(), "LicenceDialog");
- ActivityUtils.addFragmentToActivity(getSupportFragmentManager(),
- LicenceFragment.newInstance(), R.id.frame_container);
+ WebView webView = (WebView) getLayoutInflater().inflate(R.layout
+ .fragment_licence, navigationView, false);
+
+ webView.getSettings().setUseWideViewPort(true);
+ webView.loadUrl("file:///android_asset/licences.html");
+
+ AlertDialog alertDialog = new AlertDialog.Builder
+ (DashboardActivity.this, R.style.Theme_Taverna_Dialog)
+ .setTitle(getString(R.string.title_nav_os_licences))
+ .setView(webView)
+ .setPositiveButton(android.R.string.ok, null)
+ .create();
+
+ alertDialog.show();
mDrawerLayout.closeDrawers();
return true;
[2/8] incubator-taverna-mobile git commit: Remove unused webview code
Posted by sa...@apache.org.
Remove unused webview code
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/df8cb041
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/df8cb041
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/df8cb041
Branch: refs/heads/master
Commit: df8cb041fde3eff85d9b948c6d483af1fe0355b3
Parents: bcdba79
Author: Ian Dunlop <ia...@manchester.ac.uk>
Authored: Wed Nov 2 16:51:10 2016 +0000
Committer: Ian Dunlop <ia...@manchester.ac.uk>
Committed: Wed Nov 2 16:51:10 2016 +0000
----------------------------------------------------------------------
.../java/org/apache/taverna/mobile/ui/DashboardActivity.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/df8cb041/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
index 7d84074..0ae64c8 100644
--- a/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
+++ b/app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java
@@ -183,9 +183,7 @@ public class DashboardActivity extends AppCompatActivity {
return true;
case R.id.os_licences:
- WebView view = (WebView) getLayoutInflater().inflate(R.layout.fragment_licence, navigationView, false);
- view.loadUrl("file:///android_asset/licences.html");
-
+
LicenceFragment dialog = LicenceFragment.newInstance();
dialog.show(getSupportFragmentManager(), "LicenceDialog");
ActivityUtils.addFragmentToActivity(getSupportFragmentManager(),
[6/8] incubator-taverna-mobile git commit: remove useless files
Posted by sa...@apache.org.
remove useless files
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/87336a70
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/87336a70
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/87336a70
Branch: refs/heads/master
Commit: 87336a7093226c958bdbb2431d2bc79dc40cf6c4
Parents: 3c54df1
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 20:47:40 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 20:47:40 2016 +0530
----------------------------------------------------------------------
app/src/main/assets/licences.json | 132 -------------------
.../data/model/licence/LicenceContent.java | 28 ----
.../mobile/ui/licence/LicenceFragment.java | 55 --------
3 files changed, 215 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/87336a70/app/src/main/assets/licences.json
----------------------------------------------------------------------
diff --git a/app/src/main/assets/licences.json b/app/src/main/assets/licences.json
deleted file mode 100644
index 8bc8d1d..0000000
--- a/app/src/main/assets/licences.json
+++ /dev/null
@@ -1,132 +0,0 @@
-[
- {
- "name": "com.android.support:appcompat",
- "version": "v7:23.3.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.android.support:cardview",
- "version": "v7:23.3.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.android.support:recyclerview",
- "version": "v7:23.3.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.android.support:support",
- "version": "v4:23.3.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.android.support:design",
- "version": ":23.3.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.squareup.retrofit2:retrofit",
- "version": "2.0.2",
- "licence": "Apache 2"
- },
- {
- "name": "com.squareup.retrofit2:adapter-rxjava",
- "version": "2.0.2",
- "licence": "Apache 2"
- },
- {
- "name": "com.squareup.okhttp3:logging-interceptor",
- "version": "3.2.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.squareup.retrofit2:converter-simplexml",
- "version": "2.0.2",
- "licence": "Apache 2"
- },
- {
- "name": "com.jakewharton:butterknife",
- "version": "8.0.1",
- "licence": "Apache 2"
- },
- {
- "name": "com.jakewharton:butterknife-compiler",
- "version": "8.0.1",
- "licence": "Apache 2"
- },
- {
- "name": "io.reactivex:rxandroid",
- "version": "1.2.0",
- "licence": "Apache 2"
- },
- {
- "name": "io.reactivex:rxjava",
- "version": "1.1.4",
- "licence": "Apache 2"
- },
- {
- "name": "org.simpleframework:simple-xml",
- "version": "2.7. +",
- "licence": "Apache 2"
- },
- {
- "name": "com.github.bumptech.glide:glide",
- "version": "3.6.0",
- "licence": "BSD, MIT & Apache 2"
- },
- {
- "name": "com.caverock:androidsvg",
- "version": "1.2.1",
- "licence": "Apache 2"
- },
- {
- "name": "com.github.Raizlabs.DBFlow:dbflow-processor",
- "version": "3.0.1",
- "licence": "MIT"
- },
- {
- "name": "com.github.Raizlabs.DBFlow:dbflow-core",
- "version": "3.0.1",
- "licence": "MIT"
- },
- {
- "name": "com.github.Raizlabs.DBFlow:dbflow",
- "version": "3.0.1",
- "licence": "MIT"
- },
- {
- "name": "com.facebook.stetho:stetho",
- "version": "1.3.1",
- "licence": "BSD"
- },
- {
- "name": "com.facebook.stetho:stetho-okhttp",
- "version": "3: 1.3.1",
- "licence": "BSD"
- },
- {
- "name": "com.github.chrisbanes:PhotoView",
- "version": "1.2.6",
- "licence": "Apache 2"
- },
- {
- "name": "com.androidsupport:multidex",
- "version": "1.0.0",
- "licence": "Apache 2"
- },
- {
- "name": "com.google.code.gson:gson",
- "version": "2.7",
- "licence": "Apache 2"
- },
- {
- "name": "com.squareup.retrofit2:converter-gson",
- "version": "2.0.2",
- "licence": "Apache 2"
- },
- {
- "name": "com.anton46:stepsview",
- "version": "0.0.2",
- "licence": "Apache 2"
- }
-]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/87336a70/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java b/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
deleted file mode 100644
index 74b2d42..0000000
--- a/app/src/main/java/org/apache/taverna/mobile/data/model/licence/LicenceContent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.apache.taverna.mobile.data.model.licence;
-
-public class LicenceContent {
-
- private String name;
-
- private String version;
-
- private String licence;
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getLicence() {
- return licence;
- }
-
- @Override
- public String toString() {
- return name + " " + version + " " + licence;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/87336a70/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
----------------------------------------------------------------------
diff --git a/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java b/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
deleted file mode 100644
index 4bfefee..0000000
--- a/app/src/main/java/org/apache/taverna/mobile/ui/licence/LicenceFragment.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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.licence;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.app.DialogFragment;
-import android.view.LayoutInflater;
-import android.webkit.WebView;
-
-import org.apache.taverna.mobile.R;
-
-/**
- * A fragment displaying a dialog with the licence info.
- */
-public class LicenceFragment extends DialogFragment {
-
-
- public static LicenceFragment newInstance() {
-
- return new LicenceFragment();
- }
-
- @NonNull
- @Override
- public Dialog onCreateDialog(Bundle savedInstanceState) {
- WebView view = (WebView) LayoutInflater.from(getActivity()).inflate(R.layout.fragment_licence, null);
- view.loadUrl("file:///android_asset/licences.html");
- return new AlertDialog.Builder(getActivity(), R.style.Theme_AppCompat_Light_Dialog_Alert)
- .setTitle(getString(R.string.title_nav_os_licences))
- .setView(view)
- .setPositiveButton(android.R.string.ok, null)
- .create();
- }
-
-}
[4/8] incubator-taverna-mobile git commit: add meta-data for
device-width
Posted by sa...@apache.org.
add meta-data for device-width
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/6296581b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/6296581b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/6296581b
Branch: refs/heads/master
Commit: 6296581bba7f7a4f5033c139fae3d1dcf3c35f84
Parents: 648002c
Author: Sagar <ku...@gmail.com>
Authored: Thu Nov 3 20:39:09 2016 +0530
Committer: Sagar <ku...@gmail.com>
Committed: Thu Nov 3 20:39:09 2016 +0530
----------------------------------------------------------------------
app/src/main/assets/licences.html | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/6296581b/app/src/main/assets/licences.html
----------------------------------------------------------------------
diff --git a/app/src/main/assets/licences.html b/app/src/main/assets/licences.html
index 166bbcd..eb149c5 100644
--- a/app/src/main/assets/licences.html
+++ b/app/src/main/assets/licences.html
@@ -1,6 +1,7 @@
<html>
<head>
+ <meta name="viewport" content="width=device-width">
<style>
body {
font-family: sans-serif;