diff --git a/app/build.gradle b/app/build.gradle
index 308ba655..c1a44316 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -65,7 +65,6 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
- implementation "androidx.preference:preference-ktx:$preference_version"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
diff --git a/app/src/main/java/com/rtbishop/look4sat/injection/AppModule.kt b/app/src/main/java/com/rtbishop/look4sat/injection/AppModule.kt
index 0c2b4f40..a506035f 100644
--- a/app/src/main/java/com/rtbishop/look4sat/injection/AppModule.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/injection/AppModule.kt
@@ -22,7 +22,6 @@ import android.content.Context
import android.content.SharedPreferences
import android.hardware.SensorManager
import android.location.LocationManager
-import androidx.preference.PreferenceManager
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
@@ -55,6 +54,6 @@ object AppModule {
@Provides
@Singleton
fun provideSharedPreferences(@ApplicationContext context: Context): SharedPreferences {
- return PreferenceManager.getDefaultSharedPreferences(context)
+ return context.getSharedPreferences("default", Context.MODE_PRIVATE)
}
}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/infoScreen/InfoFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/infoScreen/InfoFragment.kt
deleted file mode 100644
index a3cc3434..00000000
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/infoScreen/InfoFragment.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Look4Sat. Amateur radio satellite tracker and pass predictor.
- * Copyright (C) 2019-2021 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 3 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, see .
- */
-package com.rtbishop.look4sat.presentation.infoScreen
-
-import android.content.Intent
-import android.net.Uri
-import android.os.Bundle
-import android.text.method.LinkMovementMethod
-import android.view.View
-import androidx.fragment.app.Fragment
-import com.rtbishop.look4sat.BuildConfig
-import com.rtbishop.look4sat.R
-import com.rtbishop.look4sat.databinding.FragmentInfoBinding
-
-class InfoFragment : Fragment(R.layout.fragment_info) {
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
- FragmentInfoBinding.bind(view).apply {
- infoVersion.text =
- String.format(getString(R.string.info_version), BuildConfig.VERSION_NAME)
- infoBtnGithub.setOnClickListener {
- gotoUrl("https://github.com/rt-bishop/Look4Sat/")
- }
- infoBtnFdroid.setOnClickListener {
- gotoUrl("https://f-droid.org/en/packages/com.rtbishop.look4sat/")
- }
- infoBtnDonate.setOnClickListener {
- gotoUrl("https://www.buymeacoffee.com/rtbishop")
- }
- val moveMethod = LinkMovementMethod.getInstance()
- infoThanks.movementMethod = moveMethod
- infoWarranty.movementMethod = moveMethod
- }
- }
-
- private fun gotoUrl(url: String) {
- startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
- }
-}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsFragment.kt
new file mode 100644
index 00000000..6e568d64
--- /dev/null
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsFragment.kt
@@ -0,0 +1,187 @@
+/*
+ * Look4Sat. Amateur radio satellite tracker and pass predictor.
+ * Copyright (C) 2019-2021 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 3 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, see .
+ */
+package com.rtbishop.look4sat.presentation.prefsScreen
+
+import android.Manifest
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.net.Uri
+import android.os.Bundle
+import android.text.method.LinkMovementMethod
+import android.view.View
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.content.ContextCompat
+import androidx.fragment.app.Fragment
+import androidx.fragment.app.viewModels
+import androidx.navigation.fragment.findNavController
+import com.google.android.material.snackbar.Snackbar
+import com.rtbishop.look4sat.BuildConfig
+import com.rtbishop.look4sat.R
+import com.rtbishop.look4sat.databinding.FragmentPrefsBinding
+import com.rtbishop.look4sat.framework.PreferencesSource
+import com.rtbishop.look4sat.presentation.getNavResult
+import com.rtbishop.look4sat.presentation.navigateSafe
+import dagger.hilt.android.AndroidEntryPoint
+import javax.inject.Inject
+
+@AndroidEntryPoint
+class PrefsFragment : Fragment(R.layout.fragment_prefs) {
+
+ @Inject
+ lateinit var preferences: PreferencesSource
+ private val viewModel: PrefsViewModel by viewModels()
+ private val locPermFine = Manifest.permission.ACCESS_FINE_LOCATION
+ private val locPermCoarse = Manifest.permission.ACCESS_COARSE_LOCATION
+ private val contentContract = ActivityResultContracts.GetContent()
+ private val filePicker = registerForActivityResult(contentContract) { uri ->
+ uri?.let { viewModel.updateDataFromFile(uri) }
+ }
+ private val permReqContract = ActivityResultContracts.RequestMultiplePermissions()
+ private val locPermReq = registerForActivityResult(permReqContract) { permissions ->
+ when {
+ permissions[locPermFine] == true -> updatePositionFromGPS()
+ permissions[locPermCoarse] == true -> updatePositionFromGPS()
+ else -> showSnack(getString(R.string.pref_pos_gps_error))
+ }
+ }
+ private var _binding: FragmentPrefsBinding? = null
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+ _binding = FragmentPrefsBinding.bind(view)
+ setupInfoCard()
+ setupDataCard()
+ setupLocationCard()
+ setupWarrantyCard()
+ }
+
+ private fun setupInfoCard() {
+ _binding?.prefsInfo?.let { binding ->
+ binding.aboutVersion.text =
+ String.format(getString(R.string.about_version), BuildConfig.VERSION_NAME)
+ binding.aboutBtnGithub.setOnClickListener {
+ gotoUrl("https://github.com/rt-bishop/Look4Sat/")
+ }
+ binding.aboutBtnDonate.setOnClickListener {
+ gotoUrl("https://www.buymeacoffee.com/rtbishop")
+ }
+ binding.aboutBtnFdroid.setOnClickListener {
+ gotoUrl("https://f-droid.org/en/packages/com.rtbishop.look4sat/")
+ }
+ }
+ }
+
+ private fun setupDataCard() {
+ _binding?.prefsData?.let { binding ->
+ binding.updateBtnWeb.setOnClickListener {
+ findNavController().navigateSafe(R.id.action_prefs_to_sources)
+ }
+ binding.updateBtnFile.setOnClickListener { filePicker.launch("*/*") }
+ }
+ getNavResult>(R.id.nav_passes, "sources") { sources ->
+ viewModel.updateDataFromWeb(sources)
+ }
+ }
+
+ private fun setupLocationCard() {
+
+ }
+
+ private fun setupWarrantyCard() {
+ _binding?.prefsWarranty?.let { binding ->
+ val moveMethod = LinkMovementMethod.getInstance()
+ binding.warrantyThanks.movementMethod = moveMethod
+ binding.warrantyLicense.movementMethod = moveMethod
+ }
+ }
+
+ private fun updatePositionFromGPS() {
+ val locPermString = Manifest.permission.ACCESS_FINE_LOCATION
+ val locPermResult = ContextCompat.checkSelfPermission(requireContext(), locPermString)
+ if (locPermResult == PackageManager.PERMISSION_GRANTED) {
+ if (preferences.updatePositionFromGPS()) {
+ showSnack(getString(R.string.pref_pos_success))
+ } else {
+ showSnack(getString(R.string.pref_pos_gps_null))
+ }
+ } else locPermReq.launch(arrayOf(locPermFine, locPermCoarse))
+ }
+
+ private fun updatePositionFromQth(qthString: String): Boolean {
+ return if (preferences.updatePositionFromQTH(qthString)) {
+ showSnack(getString(R.string.pref_pos_success))
+ true
+ } else {
+ showSnack(getString(R.string.pref_pos_qth_error))
+ false
+ }
+ }
+
+ private fun setupLater() {
+// findPreference(PreferencesSource.keyPositionGPS)?.apply {
+// setOnPreferenceClickListener {
+// updatePositionFromGPS()
+// return@setOnPreferenceClickListener true
+// }
+// }
+//
+// findPreference(PreferencesSource.keyPositionQTH)?.apply {
+// setOnPreferenceChangeListener { _, newValue ->
+// updatePositionFromQth(newValue.toString())
+// }
+// }
+//
+// findPreference(PreferencesSource.keyRotatorAddress)?.apply {
+// setOnPreferenceChangeListener { _, newValue ->
+// val ip4 = "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.(?!\$)|\$)){4}\$"
+// if (newValue.toString().matches(ip4.toRegex())) {
+// return@setOnPreferenceChangeListener true
+// } else {
+// showSnack(getString(R.string.tracking_ip_invalid))
+// return@setOnPreferenceChangeListener false
+// }
+// }
+// }
+//
+// findPreference(PreferencesSource.keyRotatorPort)?.apply {
+// setOnBindEditTextListener { it.inputType = InputType.TYPE_CLASS_NUMBER }
+// setOnPreferenceChangeListener { _, newValue ->
+// val portValue = newValue.toString()
+// if (portValue.isNotEmpty() && portValue.toInt() in 1024..65535) {
+// return@setOnPreferenceChangeListener true
+// } else {
+// showSnack(getString(R.string.tracking_port_invalid))
+// return@setOnPreferenceChangeListener false
+// }
+// }
+// }
+ }
+
+ private fun showSnack(message: String) {
+ Snackbar.make(requireView(), message, Snackbar.LENGTH_SHORT).show()
+ }
+
+ private fun gotoUrl(url: String) {
+ startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
+ }
+
+ override fun onDestroyView() {
+ _binding = null
+ super.onDestroyView()
+ }
+}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsViewModel.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsViewModel.kt
new file mode 100644
index 00000000..ec7f088f
--- /dev/null
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/prefsScreen/PrefsViewModel.kt
@@ -0,0 +1,62 @@
+/*
+ * Look4Sat. Amateur radio satellite tracker and pass predictor.
+ * Copyright (C) 2019-2021 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 3 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, see .
+ */
+package com.rtbishop.look4sat.presentation.prefsScreen
+
+import android.content.ContentResolver
+import android.net.Uri
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import com.rtbishop.look4sat.domain.DataRepository
+import com.rtbishop.look4sat.framework.PreferencesSource
+import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.CoroutineExceptionHandler
+import kotlinx.coroutines.launch
+import javax.inject.Inject
+
+@HiltViewModel
+class PrefsViewModel @Inject constructor(
+ private val preferences: PreferencesSource,
+ private val resolver: ContentResolver,
+ private val dataRepository: DataRepository
+) : ViewModel() {
+
+ private val coroutineHandler = CoroutineExceptionHandler { _, throwable ->
+// Timber.d(throwable)
+// _satData.value = DataState.Error(throwable)
+ }
+
+ fun updateDataFromFile(uri: Uri) {
+ viewModelScope.launch(coroutineHandler) {
+// _satData.value = DataState.Loading
+ runCatching {
+ resolver.openInputStream(uri)?.use { stream ->
+ dataRepository.updateDataFromFile(stream)
+ }
+ }.onFailure {
+// _satData.value = DataState.Error(it)
+ }
+ }
+ }
+
+ fun updateDataFromWeb(sources: List) {
+ viewModelScope.launch(coroutineHandler) {
+// _satData.value = DataState.Loading
+ dataRepository.updateDataFromWeb(sources)
+ }
+ }
+}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/settingsScreen/SettingsFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/settingsScreen/SettingsFragment.kt
deleted file mode 100644
index 5bb926ae..00000000
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/settingsScreen/SettingsFragment.kt
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Look4Sat. Amateur radio satellite tracker and pass predictor.
- * Copyright (C) 2019-2021 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 3 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, see .
- */
-package com.rtbishop.look4sat.presentation.settingsScreen
-
-import android.Manifest
-import android.content.pm.PackageManager
-import android.os.Bundle
-import android.text.InputType
-import android.view.View
-import androidx.activity.result.contract.ActivityResultContracts
-import androidx.core.content.ContextCompat
-import androidx.preference.EditTextPreference
-import androidx.preference.Preference
-import androidx.preference.PreferenceFragmentCompat
-import com.google.android.material.snackbar.Snackbar
-import com.rtbishop.look4sat.R
-import com.rtbishop.look4sat.framework.PreferencesSource
-import dagger.hilt.android.AndroidEntryPoint
-import javax.inject.Inject
-
-@AndroidEntryPoint
-class SettingsFragment : PreferenceFragmentCompat() {
-
- @Inject
- lateinit var preferences: PreferencesSource
-
- private val permReqContract = ActivityResultContracts.RequestMultiplePermissions()
- private val locPermFine = Manifest.permission.ACCESS_FINE_LOCATION
- private val locPermCoarse = Manifest.permission.ACCESS_COARSE_LOCATION
- private val locPermReq = registerForActivityResult(permReqContract) { permissions ->
- when {
- permissions[locPermFine] == true -> updatePositionFromGPS()
- permissions[locPermCoarse] == true -> updatePositionFromGPS()
- else -> showSnack(getString(R.string.pref_pos_gps_error))
- }
- }
-
- override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
- setPreferencesFromResource(R.xml.preference, rootKey)
- }
-
- override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- super.onViewCreated(view, savedInstanceState)
-
- findPreference(PreferencesSource.keyPositionGPS)?.apply {
- setOnPreferenceClickListener {
- updatePositionFromGPS()
- return@setOnPreferenceClickListener true
- }
- }
-
- findPreference(PreferencesSource.keyPositionQTH)?.apply {
- setOnPreferenceChangeListener { _, newValue ->
- updatePositionFromQth(newValue.toString())
- }
- }
-
- findPreference(PreferencesSource.keyRotatorAddress)?.apply {
- setOnPreferenceChangeListener { _, newValue ->
- val ip4 = "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.(?!\$)|\$)){4}\$"
- if (newValue.toString().matches(ip4.toRegex())) {
- return@setOnPreferenceChangeListener true
- } else {
- showSnack(getString(R.string.tracking_rotator_address_invalid))
- return@setOnPreferenceChangeListener false
- }
- }
- }
-
- findPreference(PreferencesSource.keyRotatorPort)?.apply {
- setOnBindEditTextListener { it.inputType = InputType.TYPE_CLASS_NUMBER }
- setOnPreferenceChangeListener { _, newValue ->
- val portValue = newValue.toString()
- if (portValue.isNotEmpty() && portValue.toInt() in 1024..65535) {
- return@setOnPreferenceChangeListener true
- } else {
- showSnack(getString(R.string.tracking_rotator_port_invalid))
- return@setOnPreferenceChangeListener false
- }
- }
- }
- }
-
- private fun updatePositionFromQth(qthString: String): Boolean {
- return if (preferences.updatePositionFromQTH(qthString)) {
- showSnack(getString(R.string.pref_pos_success))
- true
- } else {
- showSnack(getString(R.string.pref_pos_qth_error))
- false
- }
- }
-
- private fun updatePositionFromGPS() {
- val locPermString = Manifest.permission.ACCESS_FINE_LOCATION
- val locPermResult = ContextCompat.checkSelfPermission(requireContext(), locPermString)
- if (locPermResult == PackageManager.PERMISSION_GRANTED) {
- if (preferences.updatePositionFromGPS()) {
- showSnack(getString(R.string.pref_pos_success))
- } else {
- showSnack(getString(R.string.pref_pos_gps_null))
- }
- } else locPermReq.launch(arrayOf(locPermFine, locPermCoarse))
- }
-
- private fun showSnack(message: String) {
- Snackbar.make(requireView(), message, Snackbar.LENGTH_SHORT).show()
- }
-}
diff --git a/app/src/main/res/drawable/ic_gps.xml b/app/src/main/res/drawable/ic_gps.xml
new file mode 100644
index 00000000..83dde279
--- /dev/null
+++ b/app/src/main/res/drawable/ic_gps.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_nav_settings.xml b/app/src/main/res/drawable/ic_nav_prefs.xml
similarity index 100%
rename from app/src/main/res/drawable/ic_nav_settings.xml
rename to app/src/main/res/drawable/ic_nav_prefs.xml
diff --git a/app/src/main/res/drawable/ic_qth.xml b/app/src/main/res/drawable/ic_qth.xml
new file mode 100644
index 00000000..27a095ca
--- /dev/null
+++ b/app/src/main/res/drawable/ic_qth.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/card_prefs_about.xml b/app/src/main/res/layout/card_prefs_about.xml
new file mode 100644
index 00000000..407795b5
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_about.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_location.xml b/app/src/main/res/layout/card_prefs_location.xml
new file mode 100644
index 00000000..4db26fc7
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_location.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_other.xml b/app/src/main/res/layout/card_prefs_other.xml
new file mode 100644
index 00000000..274be87e
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_other.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_tracking.xml b/app/src/main/res/layout/card_prefs_tracking.xml
new file mode 100644
index 00000000..174e1ffa
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_tracking.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_update.xml b/app/src/main/res/layout/card_prefs_update.xml
new file mode 100644
index 00000000..96d62aff
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_update.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_warranty.xml b/app/src/main/res/layout/card_prefs_warranty.xml
new file mode 100644
index 00000000..9cdea02e
--- /dev/null
+++ b/app/src/main/res/layout/card_prefs_warranty.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_info.xml b/app/src/main/res/layout/fragment_info.xml
deleted file mode 100644
index 9110b058..00000000
--- a/app/src/main/res/layout/fragment_info.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/fragment_prefs.xml b/app/src/main/res/layout/fragment_prefs.xml
new file mode 100644
index 00000000..607b48c8
--- /dev/null
+++ b/app/src/main/res/layout/fragment_prefs.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/nav_menu.xml b/app/src/main/res/menu/nav_menu.xml
index 6579ab44..dacc866a 100644
--- a/app/src/main/res/menu/nav_menu.xml
+++ b/app/src/main/res/menu/nav_menu.xml
@@ -13,11 +13,7 @@
android:icon="@drawable/ic_nav_map"
android:title="@string/menu_map" />
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml
index 31432bfd..a85dfe2b 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -61,12 +61,17 @@
android:name="com.rtbishop.look4sat.presentation.mapScreen.MapFragment"
tools:layout="@layout/fragment_map" />
-
+ android:id="@+id/nav_prefs"
+ android:name="com.rtbishop.look4sat.presentation.prefsScreen.PrefsFragment"
+ tools:layout="@layout/fragment_prefs">
+
+
Показывать время пролета по UTC
- Настройки слежения
- Управление поворотным устройством
- IP адрес поворотного устройства
- Введён неправильный IP адрес
- Порт поворотного устройства
- Введите порт в диапазоне от 1024 до 65535
+ Версия: %s
+ Трекер спутников для Android
+ Поддержать
- Версия: %s
- Трекер спутников для Android
- Поддержать
- Огромное спасибо:
- \n\nВам за использование этого приложения! \nЖелаю всегда чистого неба над головой!
- \n\nDavid A. B. Johnson и
+ Местоположение наземной станции
+ Данные GPS
+ Нет данных геолокации
+ Нет разрешения использовать геоданные
+ Локатор QTH
+ Неправильный локатор QTH
+ Позиция успешно обновлена
+
+ Другие настройки
+ Показывать время пролета по UTC
+ Показывать анимацию радара
+ Использовать компас
+
+ Настройки слежения
+ Управление поворотным устройством
+ IP адрес
+ Введён неправильный IP адрес
+ Порт
+ Введите порт в диапазоне от 1024 до 65535
+
+ Обновление данных спутников
+ Из Вэб
+ Из Файла
+ При обновлении возникли ошибки
+
+ Я хотел бы сказать спасибо:
+ • Вам за использование этого приложения! \nЖелаю всегда чистого неба над головой!
+ \n • David A. B. Johnson и
Dave Moten за работу над predict4java и
доступ к ней по GNU GPLv2
- \n\nAlexandru Csete за его программу
+ \n • Alexandru Csete за его программу
Gpredict, которая послужила для меня вдохновением.
- \n\nДоктору T.S. Kelso за его сайт
+ \n • Доктору T.S. Kelso за его сайт
Celestrak и доступ к файлам орбит Two-Line Element.
- \n\nLibre Space Foundation за проект
- SatNOGS, API и базу данных с информацией о спутниках.
- Политика конфиденциальности.
- \nЭто ПО поставляется без гарантий. \nПодробности в лицензии GNU GPLv3.
-
+ \n • Libre Space Foundation за проект
+ SatNOGS, API и базу данных с информацией о спутниках.
+
+ Политика конфиденциальности.
+ \nЭто ПО поставляется без гарантий. \nПодробности в лицензии GNU GPLv3.
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 522b86af..d1d1cbb0 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -3,6 +3,9 @@
#FFE082#FFCA28#121212
+ #121212
+ #1E1E1E
+ #2A2A2A#D0D0D0#808080#1e1e1e
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d1e8482b..b59bc9b2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,8 +3,8 @@
Look4Satdummy
- NoYes
+ NoCancelUpdate
@@ -84,30 +84,50 @@
Enable radar sweep animationUse sensors to rotate radar view
- Tracking preferences
- Antenna rotator control
- Rotator IP address
- Please enter a valid IP address
- Rotator port
- Please enter a port between 1024 to 65535
+ Version: %s
+ Satellite tracker and pass predictor
+ GitHub
+ Support
+ F-Droid
- Version: %s
- Satellite tracker and pass predictor
- GitHub
- F-Droid
- Support
- Huge thanks to:
- \n\nYou for downloading and using Look4Sat! \nMay your sky always be clear!
- \n\nDavid A. B. Johnson
+ Station position update
+ From GPS
+ No geolocation data
+ Check your location permissions
+ From QTH
+ Invalid QTH locator
+ Position updated successfully
+
+ Other preferences
+ Show pass time in UTC
+ Enable radar sweep animation
+ Use sensors to rotate radar view
+
+ Tracking preferences
+ Antenna rotator control
+ IP address
+ Please enter a valid IP address
+ Port
+ Please enter a port between 1024 to 65535
+
+ Satellite data update
+ From Web
+ From File
+ Update completed with errors
+
+ I would like to say thank you:
+ • To You for downloading and using Look4Sat! \nMay your sky always be clear!
+ \n • To David A. B. Johnson
and Dave Moten for creating predict4java lib
under the GNU GPLv2 license.
- \n\nAlexandru Csete for creating Gpredict
+ \n • To Alexandru Csete for creating Gpredict
satellite tracker that inspired the creation of Look4Sat.
- \n\nDr T.S. Kelso for maintaining his
+ \n • To Dr T.S. Kelso for maintaining his
Celestrak website that provides access to the TLE data.
- \n\nLibre Space Foundation for their SatNOGS
- API and DB providing a huge amount of satellite data.
+ \n • To Libre Space Foundation for their
+ SatNOGS API and DB providing a huge amount of satellite data.
- Privacy Policy.
- The app comes with no warranty. \nSee the GNU GPLv3 license for details.
-
+ Privacy Policy.
+ The app comes with no warranty. \nSee the GNU GPLv3 license for details.
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 07a117f2..5f3eb221 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -26,14 +26,24 @@
+
+
-
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml
deleted file mode 100644
index fda8b248..00000000
--- a/app/src/main/res/xml/preference.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build.gradle b/build.gradle
index 2ca775ac..e4f87bc7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,20 +1,20 @@
buildscript {
ext {
gradle_version = '7.0.4'
- kotlin_version = '1.6.0'
- coroutines_version = '1.5.2-native-mt'
+ kotlin_version = '1.6.10'
+ coroutines_version = '1.6.0-native-mt'
splash_screen_version = '1.0.0-alpha01'
constraint_layout_version = '2.1.2'
lifecycle_version = '2.4.0'
navigation_version = '2.3.5'
preference_version = '1.1.1'
- room_version = '2.3.0'
+ room_version = '2.4.0'
hilt_version = '2.40.5'
json_version = '20211205'
osmdroid_version = '6.1.11'
timber_version = '5.0.1'
junit_version = '4.13.2'
- mockito_version = '4.1.0'
+ mockito_version = '4.2.0'
leak_canary_version = '2.7'
}
repositories {