Satellite tracker and pass predictor for Android, inspired by Gpredict
Kotlin amsatcelestrakgpsham-radiohamlibhamradiokotlinnasaradiosatellitesatellite-datasatellite-positionsatellite-predictionsatellitessatnogssdrspacespacexstarlink
Recreated About screen in Compose
Arty Bishopee5b5a894b69
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/aboutScreen/AboutFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/aboutScreen/AboutFragment.ktindex a739045f..7b5a2746 100644--- a/app/src/main/java/com/rtbishop/look4sat/presentation/aboutScreen/AboutFragment.kt+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/aboutScreen/AboutFragment.kt@@ -1,15 +1,14 @@package com.rtbishop.look4sat.presentation.aboutScreen+import android.content.Intent+import android.net.Uriimport android.os.Bundleimport android.view.LayoutInflaterimport android.view.Viewimport android.view.ViewGroupimport androidx.compose.foundation.layout.*import androidx.compose.foundation.lazy.LazyColumn-import androidx.compose.material.Card-import androidx.compose.material.Icon-import androidx.compose.material.MaterialTheme-import androidx.compose.material.Text+import androidx.compose.material.*import androidx.compose.runtime.Composableimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifier@@ -17,11 +16,14 @@ import androidx.compose.ui.platform.ComposeViewimport androidx.compose.ui.platform.ViewCompositionStrategyimport androidx.compose.ui.res.painterResourceimport androidx.compose.ui.res.stringResource+import androidx.compose.ui.text.TextStyle+import androidx.compose.ui.text.font.FontWeightimport androidx.compose.ui.text.style.TextAlignimport androidx.compose.ui.tooling.preview.Previewimport androidx.compose.ui.unit.dpimport androidx.compose.ui.unit.spimport androidx.fragment.app.Fragment+import com.rtbishop.look4sat.BuildConfigimport com.rtbishop.look4sat.Rimport com.rtbishop.look4sat.presentation.theme.Look4SatThemeimport dagger.hilt.android.AndroidEntryPoint@@ -43,18 +45,18 @@ class AboutFragment : Fragment() {private fun AboutScreen() {Look4SatTheme {LazyColumn(- contentPadding = PaddingValues(8.dp),- verticalArrangement = Arrangement.spacedBy(8.dp),+ contentPadding = PaddingValues(6.dp),+ verticalArrangement = Arrangement.spacedBy(6.dp),modifier = Modifier.fillMaxSize()) {- item { CardAbout() }- item { CardOutro() }+ item { CardAbout(BuildConfig.VERSION_NAME) }+ item { CardCredits() }}}}@Composable- private fun CardAbout(modifier: Modifier = Modifier, version: String = "3.2.0") {+ private fun CardAbout(version: String, modifier: Modifier = Modifier) {Card(modifier = modifier.fillMaxWidth()) {Column(horizontalAlignment = Alignment.CenterHorizontally) {Row(horizontalArrangement = Arrangement.Center) {@@ -81,35 +83,83 @@ class AboutFragment : Fragment() {Text(text = stringResource(id = R.string.app_subtitle),fontSize = 21.sp,- modifier = modifier.padding(top = 4.dp, bottom = 8.dp)+ modifier = modifier.padding(top = 4.dp))+ Row(+ horizontalArrangement = Arrangement.SpaceEvenly,+ modifier = Modifier.padding(start = 4.dp, end = 4.dp)+ ) {+ LinkButton(+ onClick = { gotoUrl("https://sites.google.com/view/look4sat-privacy-policy/home") },+ text = stringResource(id = R.string.btn_privacy),+ modifier = Modifier.weight(1f)+ )+ LinkButton(+ onClick = { gotoUrl("https://www.gnu.org/licenses/gpl-3.0.html") },+ text = stringResource(id = R.string.btn_license),+ modifier = Modifier.weight(1f)+ )+ }}}}@Composable- fun CardOutro(modifier: Modifier = Modifier) {+ private fun CardCredits(modifier: Modifier = Modifier) {Card(modifier = modifier.fillMaxWidth()) {Column(horizontalAlignment = Alignment.CenterHorizontally) {Text(text = stringResource(id = R.string.outro_title),- fontSize = 19.sp,+ fontSize = 18.sp,color = MaterialTheme.colors.secondary,modifier = modifier.padding(8.dp))Text(text = stringResource(id = R.string.outro_thanks),- fontSize = 17.sp,+ fontSize = 16.sp,textAlign = TextAlign.Center,modifier = modifier.padding(start = 8.dp, end = 8.dp))Text(text = stringResource(id = R.string.outro_license),- fontSize = 17.sp,- textAlign = TextAlign.Center,- modifier = modifier.padding(8.dp)+ fontSize = 18.sp,+ color = MaterialTheme.colors.secondary,+ modifier = modifier.padding(start = 8.dp, end = 8.dp, top = 8.dp, bottom = 4.dp))+ Row(+ horizontalArrangement = Arrangement.SpaceEvenly,+ modifier = Modifier.padding(start = 4.dp, end = 4.dp)+ ) {+ LinkButton(+ onClick = { gotoUrl("https://github.com/rt-bishop/Look4Sat/") },+ text = stringResource(id = R.string.btn_github),+ modifier = Modifier.weight(1f)+ )+ LinkButton(+ onClick = { gotoUrl("https://ko-fi.com/rt_bishop") },+ text = stringResource(id = R.string.btn_support),+ modifier = Modifier.weight(1f)+ )+ LinkButton(+ onClick = { gotoUrl("https://f-droid.org/en/packages/com.rtbishop.look4sat/") },+ text = stringResource(id = R.string.btn_fdroid),+ modifier = Modifier.weight(1f)+ )+ }}}}++ @Composable+ private fun LinkButton(onClick: () -> Unit, text: String, modifier: Modifier = Modifier) {+ Button(+ onClick = { onClick() },+ colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primaryVariant),+ modifier = modifier.padding(4.dp)+ ) {+ Text(text = text, style = TextStyle(fontWeight = FontWeight.Bold), fontSize = 18.sp)+ }+ }++ private fun gotoUrl(url: String) = startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))}diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Shape.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Shape.ktindex 300e421f..1078280d 100644--- a/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Shape.kt+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Shape.kt@@ -5,7 +5,7 @@ import androidx.compose.material.Shapesimport androidx.compose.ui.unit.dpval Shapes = Shapes(- small = RoundedCornerShape(8.dp),- medium = RoundedCornerShape(8.dp),- large = RoundedCornerShape(8.dp)+ small = RoundedCornerShape(12.dp),+ medium = RoundedCornerShape(12.dp),+ large = RoundedCornerShape(12.dp))diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Theme.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Theme.ktindex 546ad5d6..13e8fe3e 100644--- a/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Theme.kt+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/theme/Theme.kt@@ -14,7 +14,7 @@ fun Look4SatTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composabprivate val LightColors = lightColors(primary = SurfaceGrey,- primaryVariant = Background,+ primaryVariant = ButtonGrey,secondary = Yellow,background = Background,surface = SurfaceGrey,@@ -26,7 +26,7 @@ private val LightColors = lightColors(private val DarkColors = darkColors(primary = SurfaceGrey,- primaryVariant = Background,+ primaryVariant = ButtonGrey,secondary = Yellow,background = Background,surface = SurfaceGrey,diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xmlindex 9901fb21..7aced4f5 100644--- a/app/src/main/res/values-ru/strings.xml+++ b/app/src/main/res/values-ru/strings.xml@@ -38,6 +38,8 @@<string name="btn_github">GitHub</string><string name="btn_support">Поддержать</string><string name="btn_fdroid">F-Droid</string>+ <string name="btn_privacy">Конфиденц.</string>+ <string name="btn_license">Лицензия</string><!--Dialogs-->@@ -176,7 +178,5 @@\n • <a href="https://appoftheday.downloadastro.com/app/look4sat-satellite-tracker/">DownloadAstro</a>за интерес к приложению и публикацию интервью на сайте.</string>- <string name="outro_license"><a href="https://sites.google.com/view/look4sat-privacy-policy/home">Политика конфиденциальности.</a>- \nЭто ПО поставляется без гарантий. \nПодробности в лицензии <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPLv3</a>.- </string>+ <string name="outro_license">Это ПО поставляется без гарантий.</string></resources>diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xmlindex de7db7d3..ae1bf34a 100644--- a/app/src/main/res/values-zh-rCN/strings.xml+++ b/app/src/main/res/values-zh-rCN/strings.xml@@ -38,6 +38,8 @@<string name="btn_github">GitHub</string><string name="btn_support">支持</string><string name="btn_fdroid">F-Droid</string>+ <string name="btn_privacy">隐私政策</string>+ <string name="btn_license">GNU GPLv3</string><!--Dialogs-->@@ -177,7 +179,5 @@\n • <a href="https://appoftheday.downloadastro.com/app/look4sat-satellite-tracker/">DownloadAstro</a>team for their interest to the app and the interview published.</string>- <string name="outro_license"><a href="https://sites.google.com/view/look4sat-privacy-policy/home">隐私政策</a>- 该应用程序不提供任何保修。\n有关详细信息,请参阅 <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPLv3 许可证</a> 。- </string>+ <string name="outro_license">该应用程序不提供任何保修.</string></resources>diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xmlindex de6a2b29..18230120 100644--- a/app/src/main/res/values/strings.xml+++ b/app/src/main/res/values/strings.xml@@ -38,6 +38,8 @@<string name="btn_github">GitHub</string><string name="btn_support">Support</string><string name="btn_fdroid">F-Droid</string>+ <string name="btn_privacy">Privacy Policy</string>+ <string name="btn_license">GPLv3 Licence</string><!--Dialogs-->@@ -176,7 +178,5 @@\n\n • <a href="https://appoftheday.downloadastro.com/app/look4sat-satellite-tracker/">DownloadAstro</a>team for their interest to the app and the interview published.</string>- <string name="outro_license"><a href="https://sites.google.com/view/look4sat-privacy-policy/home">Privacy Policy.</a>- The app comes with no warranty. \nSee the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPLv3</a> license for details.- </string>+ <string name="outro_license">The app comes with no warranty.</string></resources>