Added custom source TLE update dialog
This commit is contained in:
1 parent
5de8787368
commit
1da35e901a
17 files changed
+113
-296
No files matched your search
+10
-14
@@ -28,10 +28,10 @@ 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.data.PreferencesSource
|
||||
import com.rtbishop.look4sat.framework.PreferencesProvider
|
||||
import com.rtbishop.look4sat.utility.showSnack
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -46,7 +46,7 @@ class AppSettingsFragment : PreferenceFragmentCompat() {
|
||||
if (isGranted) {
|
||||
updatePositionFromGPS()
|
||||
} else {
|
||||
showSnack(getString(R.string.pref_pos_gps_error))
|
||||
requireView().showSnack(getString(R.string.pref_pos_gps_error))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class AppSettingsFragment : PreferenceFragmentCompat() {
|
||||
if (Patterns.IP_ADDRESS.matcher(newValue.toString()).matches()) {
|
||||
return@setOnPreferenceChangeListener true
|
||||
} else {
|
||||
showSnack(getString(R.string.tracking_rotator_address_invalid))
|
||||
requireView().showSnack(getString(R.string.tracking_rotator_address_invalid))
|
||||
return@setOnPreferenceChangeListener false
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class AppSettingsFragment : PreferenceFragmentCompat() {
|
||||
if (portValue.isNotEmpty() && portValue.toInt() in 1024..65535) {
|
||||
return@setOnPreferenceChangeListener true
|
||||
} else {
|
||||
showSnack(getString(R.string.tracking_rotator_port_invalid))
|
||||
requireView().showSnack(getString(R.string.tracking_rotator_port_invalid))
|
||||
return@setOnPreferenceChangeListener false
|
||||
}
|
||||
}
|
||||
@@ -97,10 +97,10 @@ class AppSettingsFragment : PreferenceFragmentCompat() {
|
||||
|
||||
private fun updatePositionFromQth(qthString: String): Boolean {
|
||||
return if (preferencesSource.updatePositionFromQTH(qthString)) {
|
||||
showSnack(getString(R.string.pref_pos_success))
|
||||
requireView().showSnack(getString(R.string.pref_pos_success))
|
||||
true
|
||||
} else {
|
||||
showSnack(getString(R.string.pref_pos_qth_error))
|
||||
requireView().showSnack(getString(R.string.pref_pos_qth_error))
|
||||
false
|
||||
}
|
||||
}
|
||||
@@ -110,14 +110,10 @@ class AppSettingsFragment : PreferenceFragmentCompat() {
|
||||
val locPermResult = ContextCompat.checkSelfPermission(requireContext(), locPermString)
|
||||
if (locPermResult == PackageManager.PERMISSION_GRANTED) {
|
||||
if (preferencesSource.updatePositionFromGPS()) {
|
||||
showSnack(getString(R.string.pref_pos_success))
|
||||
} else showSnack(getString(R.string.pref_pos_gps_null))
|
||||
requireView().showSnack(getString(R.string.pref_pos_success))
|
||||
} else {
|
||||
requireView().showSnack(getString(R.string.pref_pos_gps_null))
|
||||
}
|
||||
} else requestPermissionLauncher.launch(locPermString)
|
||||
}
|
||||
|
||||
private fun showSnack(message: String) {
|
||||
Snackbar.make(requireView(), message, Snackbar.LENGTH_SHORT).apply {
|
||||
setAnchorView(R.id.nav_bottom)
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
-45
@@ -1,45 +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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.rtbishop.look4sat.presentation.appSplashDialog
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.appcompat.app.AppCompatDialogFragment
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.DialogSplashBinding
|
||||
|
||||
class AppSplashDialog : AppCompatDialogFragment() {
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, group: ViewGroup?, state: Bundle?): View? {
|
||||
return inflater.inflate(R.layout.dialog_splash, group, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
DialogSplashBinding.bind(view).apply {
|
||||
dialog?.window?.setLayout(
|
||||
WindowManager.LayoutParams.MATCH_PARENT,
|
||||
WindowManager.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
splashOkButton.setOnClickListener { dismiss() }
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
-5
@@ -18,18 +18,21 @@
|
||||
package com.rtbishop.look4sat.presentation.satItemScreen
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Patterns
|
||||
import android.view.View
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.DialogSourceBinding
|
||||
import com.rtbishop.look4sat.databinding.FragmentEntriesBinding
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.framework.model.Result
|
||||
import com.rtbishop.look4sat.utility.RecyclerDivider
|
||||
import com.rtbishop.look4sat.utility.showSnack
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
@@ -59,6 +62,7 @@ class SatItemFragment : Fragment(R.layout.fragment_entries) {
|
||||
addItemDecoration(RecyclerDivider(R.drawable.rec_divider_light))
|
||||
}
|
||||
importWeb.setOnClickListener { viewModel.updateEntriesFromWeb(null) }
|
||||
importSource.setOnClickListener { showSourceDialog() }
|
||||
importFile.setOnClickListener { filePicker.launch("*/*") }
|
||||
selectMode.setOnClickListener { viewModel.createModesDialog(requireContext()).show() }
|
||||
selectAll.setOnClickListener { viewModel.selectCurrentItems() }
|
||||
@@ -88,11 +92,26 @@ class SatItemFragment : Fragment(R.layout.fragment_entries) {
|
||||
is Result.Error -> {
|
||||
binding.entriesProgress.visibility = View.INVISIBLE
|
||||
binding.entriesRecycler.visibility = View.VISIBLE
|
||||
val errorMsg = getString(R.string.entries_update_error)
|
||||
Snackbar.make(requireView(), errorMsg, Snackbar.LENGTH_SHORT).apply {
|
||||
setAnchorView(R.id.nav_bottom)
|
||||
}.show()
|
||||
requireView().showSnack(getString(R.string.entries_update_error))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSourceDialog() {
|
||||
val dialogBinding = DialogSourceBinding.inflate(requireActivity().layoutInflater)
|
||||
val dialogBuilder = AlertDialog.Builder(requireContext()).apply {
|
||||
setMessage(getString(R.string.sources_title))
|
||||
setView(dialogBinding.root)
|
||||
setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
val editTextInput = dialogBinding.sourceUrl.text.toString()
|
||||
if (Patterns.WEB_URL.matcher(editTextInput).matches()) {
|
||||
viewModel.updateEntriesFromWeb(listOf(editTextInput))
|
||||
} else {
|
||||
requireView().showSnack(getString(R.string.sources_error))
|
||||
}
|
||||
}
|
||||
setNeutralButton(android.R.string.cancel, null)
|
||||
}
|
||||
dialogBuilder.create().show()
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -58,8 +58,8 @@ class SatTransAdapter : RecyclerView.Adapter<SatTransAdapter.TransHolder>() {
|
||||
RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
private val divider = 1000000f
|
||||
private val strNo = itemView.context.getString(R.string.btn_no)
|
||||
private val strYes = itemView.context.getString(R.string.btn_yes)
|
||||
private val strNo = itemView.context.getString(R.string.no)
|
||||
private val strYes = itemView.context.getString(R.string.yes)
|
||||
private val mode = itemView.context.getString(R.string.trans_mode)
|
||||
private val formatLink = itemView.context.getString(R.string.trans_link_low)
|
||||
private val formatLinkNull = itemView.context.getString(R.string.trans_no_link)
|
||||
|
||||
@@ -18,10 +18,13 @@
|
||||
package com.rtbishop.look4sat.utility
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavOptions
|
||||
import androidx.navigation.Navigator
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.rtbishop.look4sat.R
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
fun Long.toTimerString(): String {
|
||||
@@ -38,6 +41,12 @@ fun Double.round(decimals: Int): Double {
|
||||
return kotlin.math.round(this * multiplier) / multiplier
|
||||
}
|
||||
|
||||
fun View.showSnack(message: String, isAnchored: Boolean = true) {
|
||||
Snackbar.make(this, message, Snackbar.LENGTH_SHORT).apply {
|
||||
if (isAnchored) setAnchorView(R.id.nav_bottom)
|
||||
}.show()
|
||||
}
|
||||
|
||||
fun NavController.navigateSafe(
|
||||
@IdRes resId: Int,
|
||||
args: Bundle? = null,
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeLight"
|
||||
android:pathData="M19,8l-4,4h3c0,3.31 -2.69,6 -6,6 -1.01,0 -1.97,-0.25 -2.8,-0.7l-1.46,1.46C8.97,19.54 10.43,20 12,20c4.42,0 8,-3.58 8,-8h3l-4,-4zM6,12c0,-3.31 2.69,-6 6,-6 1.01,0 1.97,0.25 2.8,0.7l1.46,-1.46C15.03,4.46 13.57,4 12,4c-4.42,0 -8,3.58 -8,8H1l4,4 4,-4H6z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeLight"
|
||||
android:pathData="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeLight"
|
||||
android:pathData="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:hint="@string/sources_hint">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/sourceUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textUri" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/tleSourcesDialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/greyDark"
|
||||
android:padding="4dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/sourcesTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/sources_title"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@+id/sourcesRecycler"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/sourcesWarning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/sources_https"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/sourcesRecycler"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sourcesTitle" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/sourceBtnAdd"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_add"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/sourcesWarning"
|
||||
app:layout_constraintDimensionRatio="h,1:1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/sourcesRecycler"
|
||||
app:layout_constraintTop_toTopOf="@+id/sourcesTitle" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sourcesRecycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sourcesWarning">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sourcesBtnNeg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:text="@string/btn_cancel"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/sourcesBtnPos"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@+id/sourcesRecycler" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sourcesBtnPos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:text="@string/btn_update"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/sourcesRecycler"
|
||||
app:layout_constraintTop_toBottomOf="@+id/sourcesRecycler" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/splashRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/greyDark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splashPosIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/splashTleIcon"
|
||||
app:layout_constraintDimensionRatio="w,1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/splashPosMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_map_pos" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splashTleIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/splashOkButton"
|
||||
app:layout_constraintDimensionRatio="w,1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/splashTleMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="@+id/splashPosIcon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/splashPosIcon"
|
||||
app:srcCompat="@drawable/ic_update_web" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/splashPosMsg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="fill"
|
||||
android:padding="8dp"
|
||||
android:text="@string/splash_loc_msg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/splashPosIcon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/splashPosIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/splashPosIcon" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/splashTleMsg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="fill"
|
||||
android:padding="8dp"
|
||||
android:text="@string/splash_tle_msg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/splashTleIcon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/splashPosMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/splashTleIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/splashTleIcon" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/splashOkButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:text="@android:string/ok"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/splashTleIcon" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -30,7 +30,19 @@
|
||||
android:backgroundTint="@color/greyDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/ic_update_web"
|
||||
android:src="@drawable/ic_baseline_cached_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/import_file"
|
||||
app:layout_constraintEnd_toStartOf="@+id/import_source"
|
||||
app:layout_constraintTop_toTopOf="@+id/import_file" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/import_source"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="@color/greyDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/ic_baseline_link_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/import_file"
|
||||
app:layout_constraintEnd_toStartOf="@+id/import_file"
|
||||
app:layout_constraintTop_toTopOf="@+id/import_file" />
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/tleSourceItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/tleSourceInputLayout"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/sources_hint"
|
||||
app:endIconDrawable="@drawable/ic_map_sat"
|
||||
app:endIconMode="custom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/tleSourceUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textUri" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -59,9 +59,5 @@
|
||||
android:id="@+id/nav_info"
|
||||
android:name="com.rtbishop.look4sat.presentation.appInfoScreen.AppInfoFragment"
|
||||
tools:layout="@layout/fragment_info" />
|
||||
<dialog
|
||||
android:id="@+id/nav_dialog_splash"
|
||||
android:name="com.rtbishop.look4sat.presentation.appSplashDialog.AppSplashDialog"
|
||||
tools:layout="@layout/dialog_splash" />
|
||||
|
||||
</navigation>
|
||||
@@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="btn_yes">Да</string>
|
||||
<string name="btn_no">Нет</string>
|
||||
<string name="btn_cancel">Отмена</string>
|
||||
<string name="btn_update">Обновить</string>
|
||||
<string name="yes">Да</string>
|
||||
<string name="no">Нет</string>
|
||||
|
||||
<string name="menu_entries">Спутники</string>
|
||||
<string name="menu_passes">Пролеты</string>
|
||||
@@ -11,9 +9,9 @@
|
||||
<string name="menu_prefs">Настройки</string>
|
||||
<string name="menu_about">Инфо</string>
|
||||
|
||||
<string name="sources_title">Управление TLE</string>
|
||||
<string name="sources_hint">Источник TLE</string>
|
||||
<string name="sources_https">Только протокол HTTPS</string>
|
||||
<string name="sources_title">Введите HTTPS адрес источника</string>
|
||||
<string name="sources_hint">URL источника</string>
|
||||
<string name="sources_error">Пожалуйста, проверьте URL</string>
|
||||
|
||||
<string name="entries_update">Обновить спутники:</string>
|
||||
<string name="entries_search_hint">Имя / Номер</string>
|
||||
@@ -60,11 +58,6 @@
|
||||
<string name="pref_compass_title">Использовать компас</string>
|
||||
<string name="pref_time_utc_title">Показывать время пролета по UTC</string>
|
||||
|
||||
<string name="splash_tle_msg">Данные спутников теряют точность со временем, поэтому
|
||||
их рекомендуется обновлять примерно раз в неделю</string>
|
||||
<string name="splash_loc_msg">Чтобы корректно рассчитывать орбиты спутников,
|
||||
установите позицию наземной станции через меню Настройки</string>
|
||||
|
||||
<string name="tracking_title">Настройки слежения</string>
|
||||
<string name="tracking_rotator_switch">Управление поворотным устройством</string>
|
||||
<string name="tracking_rotator_address">IP адрес поворотного устройства</string>
|
||||
@@ -74,7 +67,7 @@
|
||||
|
||||
<string name="info_version">Версия: %s</string>
|
||||
<string name="info_subtitle">Трекер спутников для Android</string>
|
||||
<string name="info_bmc">Угостить кофе</string>
|
||||
<string name="info_bmc">Поддержать</string>
|
||||
<string name="info_thanks">Огромное спасибо:
|
||||
\n— Вам за использование этого приложения! \nЖелаю всегда чистого неба над головой!
|
||||
\n— <a href="https://github.com/g4dpz">David A. B. Johnson</a> и
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
<string name="app_name" translatable="false">Look4Sat</string>
|
||||
<string name="placeholder" translatable="false">Placeholder</string>
|
||||
|
||||
<string name="btn_no">No</string>
|
||||
<string name="btn_yes">Yes</string>
|
||||
<string name="btn_cancel">Cancel</string>
|
||||
<string name="btn_update">Update</string>
|
||||
<string name="no">No</string>
|
||||
<string name="yes">Yes</string>
|
||||
|
||||
<string name="menu_entries">Satellites</string>
|
||||
<string name="menu_passes">Passes</string>
|
||||
@@ -14,9 +12,9 @@
|
||||
<string name="menu_prefs">Settings</string>
|
||||
<string name="menu_about">Info</string>
|
||||
|
||||
<string name="sources_title">Manage TLE sources</string>
|
||||
<string name="sources_hint">TLE source</string>
|
||||
<string name="sources_https">Protocol HTTPS only</string>
|
||||
<string name="sources_title">Enter HTTPS source address</string>
|
||||
<string name="sources_hint">Source URL</string>
|
||||
<string name="sources_error">Please check the entered URL</string>
|
||||
|
||||
<string name="entries_update">TLE data update:</string>
|
||||
<string name="entries_search_hint">Name / Id</string>
|
||||
@@ -76,11 +74,6 @@
|
||||
<string name="pref_time_utc_title">Show pass time in UTC</string>
|
||||
<string name="pref_compass_title">Use sensors to rotate PolarView</string>
|
||||
|
||||
<string name="splash_tle_msg">TLE satellite data looses precision over time, so it is
|
||||
recommended to update it every week or so</string>
|
||||
<string name="splash_loc_msg">To get the accurate predictions please set
|
||||
the ground station position via the Settings menu</string>
|
||||
|
||||
<string name="tracking_title">Tracking preferences</string>
|
||||
<string name="tracking_rotator_switch">Antenna rotator control</string>
|
||||
<string name="tracking_rotator_address">Rotator IP address</string>
|
||||
|
||||
Reference in new issue
Block a user