Added About the App fragment, used libraries info, their licences and authors mentions

This commit is contained in:
Arty Bishop committed 2020-01-21 17:11:01 +00:00
1 parent e11e4863d3
commit 2fae9bfb34
12 files changed
+242 -40

No files matched your search

@@ -20,19 +20,35 @@
package com.rtbishop.look4sat.ui
import android.os.Bundle
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import com.rtbishop.look4sat.BuildConfig
import com.rtbishop.look4sat.R
class CreditsFragment : Fragment() {
class AboutFragment : Fragment() {
private lateinit var textVersion: TextView
private lateinit var textThanks: TextView
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.fragment_credits, container, false)
return inflater.inflate(R.layout.fragment_about, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
textVersion = view.findViewById(R.id.about_title_version)
textThanks = view.findViewById(R.id.about_thanks_to)
textVersion.text = String.format(getString(R.string.app_version), BuildConfig.VERSION_NAME)
textThanks.movementMethod = LinkMovementMethod.getInstance()
}
}
@@ -93,7 +93,7 @@ class MainActivity : AppCompatActivity() {
drawerBtnExit = header.findViewById(R.id.drawer_btn_exit)
appBarConfig = AppBarConfiguration(
setOf(R.id.nav_pass_list, R.id.nav_map_view, R.id.nav_credits, R.id.nav_about),
setOf(R.id.nav_pass_list, R.id.nav_map_view, R.id.nav_settings, R.id.nav_about),
drawerLayout
)
+22 -3
View File
@@ -1,9 +1,28 @@
<!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:fillColor="#C0C0C0"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,19h-2v-2h2v2zM15.07,11.25l-0.9,0.92C13.45,12.9 13,13.5 13,15h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,9c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z" />
</vector>
-9
View File
@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M1,21h4L5,9L1,9v12zM23,10c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.59,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-1.91l-0.01,-0.01L23,10z" />
</vector>
+2 -2
View File
@@ -23,9 +23,9 @@
android:viewportWidth="128"
android:viewportHeight="128">
<path
android:fillColor="#52C0C0C0"
android:fillColor="#FFE082"
android:pathData="m96.642,31.504c7.911,7.997 17.143,13.584 25.365,15.581l1.754,-3.997C123.78,43.048 123.786,43.005 123.802,42.965 125.834,38.995 127,34.495 127,29.715 127,13.881 114.379,1 98.867,1c-5.125,0 -9.92,1.429 -14.064,3.884l-3.398,1.598c0.08,0.306 0.133,0.599 0.221,0.91 2.32,8.104 7.652,16.667 15.016,24.112z" />
<path
android:fillColor="#52C0C0C0"
android:fillColor="#FFE082"
android:pathData="M93.876,34.3C86.053,26.391 80.369,17.225 77.87,8.49 77.84,8.385 77.818,8.285 77.788,8.181L2.629,43.513c-1.404,0.66 -2.019,2.358 -1.372,3.791 0.472,1.046 1.485,1.663 2.545,1.663 0.392,0 0.79,-0.084 1.169,-0.263L74.045,16.235c-1.873,3.578 -2.997,7.611 -3.228,11.885L35.566,51.732c-1.294,0.866 -1.653,2.638 -0.805,3.957 0.538,0.836 1.431,1.29 2.344,1.29 0.526,0 1.06,-0.151 1.533,-0.469L71.189,34.707c1.4,8.11 6.135,15.044 12.715,19.285l-54.945,68.337c-0.981,1.22 -0.808,3.021 0.388,4.023 0.521,0.437 1.149,0.649 1.775,0.649 0.809,0 1.611,-0.357 2.166,-1.045L89.056,56.595c3.06,1.168 6.357,1.838 9.811,1.838 4.932,0 9.566,-1.312 13.601,-3.597L84.602,118.323c-0.633,1.44 0,3.131 1.41,3.777 0.372,0.17 0.76,0.25 1.144,0.25 1.07,0 2.092,-0.629 2.556,-1.691L120.402,50.739C111.642,48.416 102.042,42.555 93.876,34.3Z" />
</vector>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

+104
View File
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.AboutFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/about_title"
style="@style/AboutTitle"
android:layout_marginStart="4dp"
android:layout_marginEnd="16dp"
android:text="@string/app_name"
app:layout_constraintBottom_toBottomOf="@+id/about_title_img"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/about_title_img"
app:layout_constraintTop_toTopOf="@+id/about_title_img" />
<ImageView
android:id="@+id/about_title_img"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="4dp"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_sputnik"
app:layout_constraintEnd_toStartOf="@+id/about_title"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/about_title_version"
style="@style/AboutSubtitle"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:text="@string/app_version"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_title" />
<TextView
android:id="@+id/about_subtitle"
style="@style/AboutSubtitle"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="32dp"
android:text="@string/about_subtitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_title_version" />
<TextView
android:id="@+id/about_thanks"
style="@style/AboutSubtitle"
android:layout_marginTop="16dp"
android:text="@string/about_thanks_to"
app:layout_constraintEnd_toEndOf="@+id/about_subtitle"
app:layout_constraintStart_toStartOf="@+id/about_subtitle"
app:layout_constraintTop_toBottomOf="@+id/about_subtitle" />
<TextView
android:id="@+id/about_thanks_to"
style="@style/AboutRegular"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/about_thanks_list"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_thanks" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.CreditsFragment" />
+19 -4
View File
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view">
@@ -20,9 +39,5 @@
android:id="@+id/nav_about"
android:icon="@drawable/ic_about"
android:title="@string/menu_about" />
<item
android:id="@+id/nav_credits"
android:icon="@drawable/ic_credits"
android:title="@string/menu_credits" />
</group>
</menu>
+25 -12
View File
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License along
~ with this program; if not, write to the Free Software Foundation, Inc.,
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
@@ -35,21 +54,15 @@
android:label="@string/menu_map_view"
tools:layout="@layout/fragment_map_view" />
<fragment
android:id="@+id/nav_credits"
android:name="com.rtbishop.look4sat.ui.CreditsFragment"
android:label="@string/menu_credits"
tools:layout="@layout/fragment_credits" />
<fragment
android:id="@+id/nav_about"
android:name="com.rtbishop.look4sat.ui.CreditsFragment"
android:label="@string/menu_credits"
tools:layout="@layout/fragment_credits" />
<fragment
android:id="@+id/nav_settings"
android:name="com.rtbishop.look4sat.ui.SettingsFragment"
android:label="@string/menu_settings" />
<fragment
android:id="@+id/nav_about"
android:name="com.rtbishop.look4sat.ui.AboutFragment"
android:label="@string/menu_about"
tools:layout="@layout/fragment_about" />
</navigation>
+29 -1
View File
@@ -19,6 +19,7 @@
<resources>
<string name="app_name">Look4Sat</string>
<string name="app_version">Version: %s</string>
<string name="drawer_title">L∞king \n4Sat…</string>
<string name="drawer_lat_text">Latitude: </string>
@@ -38,7 +39,6 @@
<string name="menu_polar_view">Polar View</string>
<string name="menu_map_view">World Map View</string>
<string name="menu_settings">Settings</string>
<string name="menu_credits">Credits</string>
<string name="menu_about">About the App</string>
<string name="dialog_select_sat">Select satellites to track…</string>
@@ -122,6 +122,34 @@
<string name="info_select_text">
Press this button to select the satellites you wish to track</string>
<string name="about_subtitle">
Amateur radio &amp; weather satellites passes calculator for Android</string>
<string name="about_thanks_to">Big thanks:</string>
<string name="about_thanks_list">— To you for installing and using this app!
\nMay your sky always be clear! \n
\n— To David A. B. Johnson, <a href="https://github.com/g4dpz">G4DPZ</a>, the author of
predict4java library which this app is using for all the SGP4 model calculations. \n
\n— To <a href="https://github.com/davidmoten">Dave Moten</a> for creating the mavenized fork
of predict4java which made it super easy to integrate the library in the app. Predict4java
is available under the
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> license. \n
\n— To Alexandru Csete, <a href="https://github.com/csete">OZ9AEC</a>,
for his amazing Gpredict program which inspired the creation of Look4Sat. \n
\n— To Guys from Square for creating an amazing set of libraries (OkHttp, Okio, Retrofit)
and for making them available under the
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a> license. \n
\n— To Guys from Google and AOSP for making the best mobile OS available nowadays, for their
Google Play Services, Gson and Dagger2 libs. \n
\nThis application comes with absolutely no warranty. See the
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> for details.
</string>
<string name="btn_yes">Yes</string>
<string name="btn_no">No</string>
<string name="btn_ok">OK</string>
+22
View File
@@ -129,4 +129,26 @@
<item name="android:paddingBottom">2dp</item>
</style>
<style name="AboutTitle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/themeAccent</item>
<item name="android:textSize">42sp</item>
</style>
<style name="AboutSubtitle">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/themeLight</item>
<item name="android:textSize">17sp</item>
</style>
<style name="AboutRegular">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/themeLight</item>
<item name="android:textSize">15sp</item>
</style>
</resources>