Skip to content

Satellite tracker and pass predictor for Android, inspired by Gpredict

More changes to layouts, fragments and styles

Arty Bishop38787b45c14e
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 36a69809..25a7bb20 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -14,7 +14,7 @@
android:label="@string/app_name"
android:theme="@style/Theme.Look4Sat.Main">
<activity
- android:name=".presentation.Look4SatActivity"
+ android:name=".presentation.MainActivity"
android:exported="true"
android:theme="@style/Theme.Look4Sat.SplashScreen">
<intent-filter>
@@ -24,4 +24,4 @@
</activity>
</application>
-</manifest>
+</manifest>
\ No newline at end of file
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/Look4SatActivity.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/MainActivity.kt
similarity index 89%
rename from app/src/main/java/com/rtbishop/look4sat/presentation/Look4SatActivity.kt
rename to app/src/main/java/com/rtbishop/look4sat/presentation/MainActivity.kt
index 8d4ed819..fac74185 100644
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/Look4SatActivity.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/MainActivity.kt
@@ -20,13 +20,16 @@ package com.rtbishop.look4sat.presentation
import android.annotation.SuppressLint
import android.content.pm.ActivityInfo
import android.os.Bundle
+import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.rtbishop.look4sat.databinding.ActivityMainBinding
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
-class Look4SatActivity : AppCompatActivity() {
+class MainActivity : AppCompatActivity() {
+
+ private val mainViewModel: MainViewModel by viewModels()
@SuppressLint("SourceLockedOrientationActivity")
override fun onCreate(savedInstanceState: Bundle?) {
@@ -34,5 +37,6 @@ class Look4SatActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
installSplashScreen()
setContentView(ActivityMainBinding.inflate(layoutInflater).root)
+ mainViewModel.calculatePasses()
}
}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/MainViewModel.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/MainViewModel.kt
new file mode 100644
index 00000000..148065f8
--- /dev/null
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/MainViewModel.kt
@@ -0,0 +1,30 @@
+package com.rtbishop.look4sat.presentation
+
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import com.rtbishop.look4sat.domain.DataRepository
+import com.rtbishop.look4sat.domain.predict.Predictor
+import com.rtbishop.look4sat.framework.SettingsProvider
+import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.launch
+import javax.inject.Inject
+
+@HiltViewModel
+class MainViewModel @Inject constructor(
+ private val predictor: Predictor,
+ private val preferences: SettingsProvider,
+ private val dataRepository: DataRepository
+) : ViewModel() {
+
+ fun calculatePasses(
+ hoursAhead: Int = preferences.getHoursAhead(),
+ minElevation: Double = preferences.getMinElevation(),
+ timeRef: Long = System.currentTimeMillis()
+ ) {
+ viewModelScope.launch {
+ val satellites = dataRepository.getSelectedSatellites()
+ val stationPos = preferences.loadStationPosition()
+ predictor.forceCalculation(satellites, stationPos, timeRef, hoursAhead, minElevation)
+ }
+ }
+}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/entriesScreen/EntriesFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/entriesScreen/EntriesFragment.kt
index 7a6f199c..e24706b5 100644
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/entriesScreen/EntriesFragment.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/entriesScreen/EntriesFragment.kt
@@ -24,8 +24,8 @@ import androidx.core.widget.doOnTextChanged
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
+import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.GridLayoutManager
-import androidx.recyclerview.widget.SimpleItemAnimator
import com.google.android.material.snackbar.Snackbar
import com.rtbishop.look4sat.R
import com.rtbishop.look4sat.databinding.FragmentEntriesBinding
@@ -44,14 +44,16 @@ class EntriesFragment : Fragment(R.layout.fragment_entries) {
}
private fun setupComponents(view: View) {
- val entriesAdapter = EntriesAdapter(viewModel)
+ val context = requireContext()
+ val adapter = EntriesAdapter(viewModel)
+ val layoutManager = GridLayoutManager(context, 2)
+ val itemDecoration = DividerItemDecoration(context, layoutManager.orientation)
val binding = FragmentEntriesBinding.bind(view).apply {
entriesRecycler.apply {
setHasFixedSize(true)
- adapter = entriesAdapter
- layoutManager = GridLayoutManager(requireContext(), 2)
- (itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
-// addItemDecoration(ItemDivider(R.drawable.divider_dark))
+ this.adapter = adapter
+ this.layoutManager = layoutManager
+ addItemDecoration(itemDecoration)
}
entriesBack.setOnClickListener { findNavController().navigateUp() }
entriesSearch.doOnTextChanged { text, _, _, _ -> viewModel.setQuery(text.toString()) }
@@ -59,7 +61,7 @@ class EntriesFragment : Fragment(R.layout.fragment_entries) {
entriesSelectAll.setOnClickListener { viewModel.selectCurrentItems() }
}
viewModel.satData.observe(viewLifecycleOwner, { satData ->
- handleSatData(satData, binding, entriesAdapter)
+ handleSatData(satData, binding, adapter)
})
}
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/passesScreen/PassesFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/passesScreen/PassesFragment.kt
index 2a50afad..ca69b4a2 100644
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/passesScreen/PassesFragment.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/passesScreen/PassesFragment.kt
@@ -23,9 +23,9 @@ import androidx.core.os.bundleOf
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
+import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import androidx.recyclerview.widget.SimpleItemAnimator
import com.rtbishop.look4sat.R
import com.rtbishop.look4sat.databinding.FragmentPassesBinding
import com.rtbishop.look4sat.domain.model.DataState
@@ -47,14 +47,16 @@ class PassesFragment : Fragment(R.layout.fragment_passes), PassesAdapter.PassesC
}
private fun setupComponents(view: View) {
- val passesAdapter = PassesAdapter(passesViewModel.shouldUseUTC(), this)
+ val context = requireContext()
+ val adapter = PassesAdapter(passesViewModel.shouldUseUTC(), this)
+ val layoutManager = LinearLayoutManager(context)
+ val itemDecoration = DividerItemDecoration(context, layoutManager.orientation)
val binding = FragmentPassesBinding.bind(view).apply {
passesList.apply {
setHasFixedSize(true)
- adapter = passesAdapter
- isVerticalScrollBarEnabled = false
- layoutManager = LinearLayoutManager(context)
- (itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
+ this.adapter = adapter
+ this.layoutManager = layoutManager
+ addItemDecoration(itemDecoration)
addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if (dy > 0 && passesFab.visibility == View.VISIBLE) passesFab.hide()
@@ -72,7 +74,7 @@ class PassesFragment : Fragment(R.layout.fragment_passes), PassesAdapter.PassesC
passesFab.setOnClickListener { findNavController().navigate(R.id.nav_satellites) }
}
passesViewModel.passes.observe(viewLifecycleOwner, { passesResult ->
- handleNewPasses(passesResult, passesAdapter, binding)
+ handleNewPasses(passesResult, adapter, binding)
})
getNavResult<Pair<Int, Double>>(R.id.nav_passes, "prefs") { prefs ->
passesViewModel.forceCalculation(prefs.first, prefs.second)
diff --git a/app/src/main/java/com/rtbishop/look4sat/presentation/radarScreen/RadarFragment.kt b/app/src/main/java/com/rtbishop/look4sat/presentation/radarScreen/RadarFragment.kt
index c4c650bc..a7b6f21b 100644
--- a/app/src/main/java/com/rtbishop/look4sat/presentation/radarScreen/RadarFragment.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/presentation/radarScreen/RadarFragment.kt
@@ -23,8 +23,8 @@ import androidx.core.os.bundleOf
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
+import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.recyclerview.widget.SimpleItemAnimator
import com.rtbishop.look4sat.R
import com.rtbishop.look4sat.databinding.FragmentRadarBinding
import com.rtbishop.look4sat.domain.predict.SatPass
@@ -45,30 +45,25 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
+ setupComponents(view)
+ }
+
+ private fun setupComponents(view: View) {
+ val context = requireContext()
+ val adapter = TransmittersAdapter()
+ val layoutManager = LinearLayoutManager(context)
+ val itemDecoration = DividerItemDecoration(context, layoutManager.orientation)
FragmentRadarBinding.bind(view).apply {
- val transAdapter = TransmittersAdapter()
radarRecycler.apply {
setHasFixedSize(true)
- adapter = transAdapter
- isVerticalScrollBarEnabled = false
- layoutManager = LinearLayoutManager(context)
- (itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
-// addItemDecoration(ItemDivider(R.drawable.divider_dark))
+ this.adapter = adapter
+ this.layoutManager = LinearLayoutManager(context)
+ addItemDecoration(itemDecoration)
}
- setupObservers(transAdapter, this)
+ setupObservers(adapter, this)
}
}
- override fun onResume() {
- super.onResume()
- viewModel.enableSensor()
- }
-
- override fun onPause() {
- super.onPause()
- viewModel.disableSensor()
- }
-
private fun setupObservers(
transmittersAdapter: TransmittersAdapter,
binding: FragmentRadarBinding
@@ -80,7 +75,7 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
setShowAim(preferences.getUseCompass())
setScanning(preferences.getShowSweep())
}
- binding.radarFrame.addView(radarView)
+ binding.radarCard.addView(radarView)
viewModel.radarData.observe(viewLifecycleOwner, { passData ->
radarView?.setPosition(passData.satPos)
radarView?.setPositions(passData.satTrack)
@@ -139,4 +134,14 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
binding.radarTimer.text = 0L.toTimerString()
}
}
+
+ override fun onResume() {
+ super.onResume()
+ viewModel.enableSensor()
+ }
+
+ override fun onPause() {
+ super.onPause()
+ viewModel.disableSensor()
+ }
}
diff --git a/app/src/main/res/drawable/item_divider.xml b/app/src/main/res/drawable/item_divider.xml
new file mode 100644
index 00000000..2b4c712d
--- /dev/null
+++ b/app/src/main/res/drawable/item_divider.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <size
+ android:width="1dp"
+ android:height="1dp" />
+ <solid android:color="@color/surfaceBg" />
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/rounded_corners.xml b/app/src/main/res/drawable/rounded_corners.xml
index 1394ce5a..ebcb0d84 100644
--- a/app/src/main/res/drawable/rounded_corners.xml
+++ b/app/src/main/res/drawable/rounded_corners.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
- android:width="0dp"
+ android:width="1dp"
android:color="@color/surfaceCard" />
<solid android:color="@color/surfaceCard" />
- <corners android:radius="@dimen/card_corner" />
+ <corners android:radius="@dimen/card_corner_high" />
</shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/card_prefs_about.xml b/app/src/main/res/layout/card_prefs_about.xml
index 49b28fb8..281a79d2 100644
--- a/app/src/main/res/layout/card_prefs_about.xml
+++ b/app/src/main/res/layout/card_prefs_about.xml
@@ -1,95 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/about_img"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginTop="8dp"
- android:src="@drawable/ic_sputnik"
- app:layout_constraintBottom_toBottomOf="@+id/about_version"
- app:layout_constraintDimensionRatio="h,1:1"
- app:layout_constraintEnd_toStartOf="@+id/about_title"
- app:layout_constraintHorizontal_chainStyle="packed"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@+id/about_title" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <TextView
- android:id="@+id/about_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:includeFontPadding="false"
- android:text="@string/app_name"
- android:textColor="@color/themeAccent"
- android:textSize="48sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/about_img"
- app:layout_constraintTop_toTopOf="parent" />
+ <ImageView
+ android:id="@+id/about_img"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginTop="8dp"
+ android:src="@drawable/ic_sputnik"
+ app:layout_constraintBottom_toBottomOf="@+id/about_version"
+ app:layout_constraintDimensionRatio="h,1:1"
+ app:layout_constraintEnd_toStartOf="@+id/about_title"
+ app:layout_constraintHorizontal_chainStyle="packed"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@+id/about_title" />
- <TextView
- android:id="@+id/about_version"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/about_version"
- android:textColor="@color/themeLight"
- android:textSize="22sp"
- app:layout_constraintStart_toStartOf="@+id/about_title"
- app:layout_constraintTop_toBottomOf="@+id/about_title" />
+ <TextView
+ android:id="@+id/about_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:includeFontPadding="false"
+ android:text="@string/app_name"
+ android:textColor="@color/themeAccent"
+ android:textSize="48sp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/about_img"
+ app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/about_subtitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:text="@string/about_subtitle"
- android:textColor="@color/themeLight"
- android:textSize="20sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/about_version" />
+ <TextView
+ android:id="@+id/about_version"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/about_version"
+ android:textColor="@color/themeLight"
+ android:textSize="22sp"
+ app:layout_constraintStart_toStartOf="@+id/about_title"
+ app:layout_constraintTop_toBottomOf="@+id/about_title" />
- <Button
- android:id="@+id/about_btn_github"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:drawableStart="@drawable/ic_github"
- android:text="@string/about_github"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/about_btn_donate"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/about_subtitle" />
+ <TextView
+ android:id="@+id/about_subtitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:text="@string/about_subtitle"
+ android:textColor="@color/themeLight"
+ android:textSize="20sp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/about_version" />
- <Button
- android:id="@+id/about_btn_donate"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:drawableStart="@drawable/ic_bmc"
- android:text="@string/about_support"
- app:layout_constraintBaseline_toBaselineOf="@+id/about_btn_github"
- app:layout_constraintEnd_toStartOf="@+id/about_btn_fdroid"
- app:layout_constraintStart_toEndOf="@+id/about_btn_github" />
+ <Button
+ android:id="@+id/about_btn_github"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp"
+ android:drawableStart="@drawable/ic_github"
+ android:text="@string/about_github"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/about_btn_donate"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/about_subtitle" />
- <Button
- android:id="@+id/about_btn_fdroid"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="4dp"
- android:drawableStart="@drawable/ic_fdroid"
- android:text="@string/about_fdroid"
- app:layout_constraintBaseline_toBaselineOf="@+id/about_btn_github"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/about_btn_donate" />
+ <Button
+ android:id="@+id/about_btn_donate"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:drawableStart="@drawable/ic_bmc"
+ android:text="@string/about_support"
+ app:layout_constraintBaseline_toBaselineOf="@+id/about_btn_github"
+ app:layout_constraintEnd_toStartOf="@+id/about_btn_fdroid"
+ app:layout_constraintStart_toEndOf="@+id/about_btn_github" />
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+ <Button
+ android:id="@+id/about_btn_fdroid"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
+ android:drawableStart="@drawable/ic_fdroid"
+ android:text="@string/about_fdroid"
+ app:layout_constraintBaseline_toBaselineOf="@+id/about_btn_github"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/about_btn_donate" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
\ 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
index aa03660b..9289f26b 100644
--- a/app/src/main/res/layout/card_prefs_location.xml
+++ b/app/src/main/res/layout/card_prefs_location.xml
@@ -1,84 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
- android:id="@+id/location_title"
- style="@style/SettingsTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/location_title"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <ProgressBar
- android:id="@+id/location_progress"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="6dp"
- android:layout_marginEnd="8dp"
- app:layout_constraintBottom_toBottomOf="@+id/location_title"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/location_title"
- app:layout_constraintTop_toTopOf="@+id/location_title" />
+ <TextView
+ android:id="@+id/location_title"
+ style="@style/SettingsTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:text="@string/location_title"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/location_lat"
- style="@style/SettingsText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="6dp"
- android:text="@string/location_lat"
- app:layout_constraintEnd_toStartOf="@+id/location_lon"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="@+id/location_title"
- app:layout_constraintTop_toBottomOf="@+id/location_title" />
+ <ProgressBar
+ android:id="@+id/location_progress"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginStart="6dp"
+ android:layout_marginEnd="8dp"
+ app:layout_constraintBottom_toBottomOf="@+id/location_title"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/location_title"
+ app:layout_constraintTop_toTopOf="@+id/location_title" />
- <TextView
- android:id="@+id/location_lon"
- style="@style/SettingsText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/location_lon"
- app:layout_constraintBaseline_toBaselineOf="@+id/location_lat"
- app:layout_constraintEnd_toEndOf="@+id/location_progress"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/location_lat" />
+ <TextView
+ android:id="@+id/location_lat"
+ style="@style/SettingsText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="6dp"
+ android:text="@string/location_lat"
+ app:layout_constraintEnd_toStartOf="@+id/location_lon"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toStartOf="@+id/location_title"
+ app:layout_constraintTop_toBottomOf="@+id/location_title" />
- <Button
- android:id="@+id/location_btn_gps"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:drawableStart="@drawable/ic_pos"
- android:text="@string/location_gps"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/location_btn_qth"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintHorizontal_chainStyle="spread_inside"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/location_lat" />
+ <TextView
+ android:id="@+id/location_lon"
+ style="@style/SettingsText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/location_lon"
+ app:layout_constraintBaseline_toBaselineOf="@+id/location_lat"
+ app:layout_constraintEnd_toEndOf="@+id/location_progress"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/location_lat" />
- <Button
- android:id="@+id/location_btn_qth"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="4dp"
- android:drawableStart="@drawable/ic_qth"
- android:text="@string/location_qth"
- app:layout_constraintBaseline_toBaselineOf="@+id/location_btn_gps"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/location_btn_gps" />
+ <Button
+ android:id="@+id/location_btn_gps"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp"
+ android:drawableStart="@drawable/ic_pos"
+ android:text="@string/location_gps"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/location_btn_qth"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintHorizontal_chainStyle="spread_inside"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/location_lat" />
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+ <Button
+ android:id="@+id/location_btn_qth"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
+ android:drawableStart="@drawable/ic_qth"
+ android:text="@string/location_qth"
+ app:layout_constraintBaseline_toBaselineOf="@+id/location_btn_gps"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/location_btn_gps" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
\ 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
index f5a01bb9..19563b82 100644
--- a/app/src/main/res/layout/card_prefs_other.xml
+++ b/app/src/main/res/layout/card_prefs_other.xml
@@ -1,56 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
- android:id="@+id/other_title"
- style="@style/SettingsTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/other_title"
- android:textColor="@color/themeAccent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <androidx.appcompat.widget.SwitchCompat
- android:id="@+id/other_switch_utc"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:layout_marginEnd="4dp"
- android:minHeight="48dp"
- android:text="@string/other_switch_utc"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="@+id/other_title"
- app:layout_constraintTop_toBottomOf="@+id/other_title" />
+ <TextView
+ android:id="@+id/other_title"
+ style="@style/SettingsTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:text="@string/other_title"
+ android:textColor="@color/themeAccent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <androidx.appcompat.widget.SwitchCompat
- android:id="@+id/other_switch_sweep"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:minHeight="48dp"
- android:text="@string/other_switch_sweep"
- app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
- app:layout_constraintStart_toStartOf="@+id/other_switch_utc"
- app:layout_constraintTop_toBottomOf="@+id/other_switch_utc" />
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/other_switch_utc"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="4dp"
+ android:minHeight="48dp"
+ android:text="@string/other_switch_utc"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@+id/other_title"
+ app:layout_constraintTop_toBottomOf="@+id/other_title" />
- <androidx.appcompat.widget.SwitchCompat
- android:id="@+id/other_switch_sensors"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:minHeight="48dp"
- android:text="@string/other_switch_sensors"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
- app:layout_constraintStart_toStartOf="@+id/other_switch_sweep"
- app:layout_constraintTop_toBottomOf="@+id/other_switch_sweep" />
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/other_switch_sweep"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:minHeight="48dp"
+ android:text="@string/other_switch_sweep"
+ app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
+ app:layout_constraintStart_toStartOf="@+id/other_switch_utc"
+ app:layout_constraintTop_toBottomOf="@+id/other_switch_utc" />
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/other_switch_sensors"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:minHeight="48dp"
+ android:text="@string/other_switch_sensors"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="@+id/other_switch_utc"
+ app:layout_constraintStart_toStartOf="@+id/other_switch_sweep"
+ app:layout_constraintTop_toBottomOf="@+id/other_switch_sweep" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
\ 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
index ef111af9..08543e2d 100644
--- a/app/src/main/res/layout/card_prefs_tracking.xml
+++ b/app/src/main/res/layout/card_prefs_tracking.xml
@@ -1,71 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
- android:id="@+id/tracking_title"
- style="@style/SettingsTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/tracking_title"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <androidx.appcompat.widget.SwitchCompat
- android:id="@+id/tracking_switch"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="4dp"
- android:minHeight="48dp"
- android:text="@string/tracking_switch"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="@+id/tracking_title"
- app:layout_constraintTop_toBottomOf="@+id/tracking_title" />
+ <TextView
+ android:id="@+id/tracking_title"
+ style="@style/SettingsTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:text="@string/tracking_title"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <com.google.android.material.textfield.TextInputLayout
- android:id="@+id/tracking_ip"
- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginEnd="4dp"
- android:layout_marginBottom="8dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/tracking_port"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/tracking_switch"
- app:layout_constraintWidth_percent="0.69">
+ <androidx.appcompat.widget.SwitchCompat
+ android:id="@+id/tracking_switch"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
+ android:minHeight="48dp"
+ android:text="@string/tracking_switch"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@+id/tracking_title"
+ app:layout_constraintTop_toBottomOf="@+id/tracking_title" />
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/tracking_ip_edit"
- android:layout_width="match_parent"
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/tracking_ip"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:hint="@string/tracking_ip_hint" />
- </com.google.android.material.textfield.TextInputLayout>
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="4dp"
+ android:layout_marginBottom="8dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/tracking_port"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/tracking_switch"
+ app:layout_constraintWidth_percent="0.69">
- <com.google.android.material.textfield.TextInputLayout
- android:id="@+id/tracking_port"
- style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="8dp"
- app:layout_constraintBottom_toBottomOf="@+id/tracking_ip"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/tracking_ip"
- app:layout_constraintTop_toTopOf="@+id/tracking_ip">
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/tracking_ip_edit"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/tracking_ip_hint" />
+ </com.google.android.material.textfield.TextInputLayout>
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/tracking_port_edit"
- android:layout_width="match_parent"
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/tracking_port"
+ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:hint="@string/tracking_port_hint" />
- </com.google.android.material.textfield.TextInputLayout>
+ android:layout_marginEnd="8dp"
+ app:layout_constraintBottom_toBottomOf="@+id/tracking_ip"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/tracking_ip"
+ app:layout_constraintTop_toTopOf="@+id/tracking_ip">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/tracking_port_edit"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/tracking_port_hint" />
+ </com.google.android.material.textfield.TextInputLayout>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+</androidx.cardview.widget.CardView>
\ 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
index 1008a47c..e4d53c77 100644
--- a/app/src/main/res/layout/card_prefs_update.xml
+++ b/app/src/main/res/layout/card_prefs_update.xml
@@ -1,59 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
- android:id="@+id/update_title"
- style="@style/SettingsTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/update_title"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <ProgressBar
- android:id="@+id/update_progress"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="6dp"
- android:layout_marginEnd="8dp"
- app:layout_constraintBottom_toBottomOf="@+id/update_title"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@+id/update_title"
- app:layout_constraintTop_toTopOf="@+id/update_title" />
+ <TextView
+ android:id="@+id/update_title"
+ style="@style/SettingsTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:text="@string/update_title"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <Button
- android:id="@+id/update_btn_web"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:drawableStart="@drawable/ic_update_web"
- android:text="@string/update_web"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toStartOf="@+id/update_btn_file"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/update_title" />
+ <ProgressBar
+ android:id="@+id/update_progress"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginStart="6dp"
+ android:layout_marginEnd="8dp"
+ app:layout_constraintBottom_toBottomOf="@+id/update_title"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@+id/update_title"
+ app:layout_constraintTop_toTopOf="@+id/update_title" />
- <Button
- android:id="@+id/update_btn_file"
- style="@style/AppButton"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="4dp"
- android:drawableStart="@drawable/ic_update_file"
- android:text="@string/update_file"
- app:layout_constraintBaseline_toBaselineOf="@+id/update_btn_web"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/update_btn_web" />
+ <Button
+ android:id="@+id/update_btn_web"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="4dp"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="4dp"
+ android:drawableStart="@drawable/ic_update_web"
+ android:text="@string/update_web"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@+id/update_btn_file"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/update_title" />
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+ <Button
+ android:id="@+id/update_btn_file"
+ style="@style/AppButton"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="4dp"
+ android:drawableStart="@drawable/ic_update_file"
+ android:text="@string/update_file"
+ app:layout_constraintBaseline_toBaselineOf="@+id/update_btn_web"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/update_btn_web" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
\ 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
index 604fb2a2..bfb76fd5 100644
--- a/app/src/main/res/layout/card_prefs_warranty.xml
+++ b/app/src/main/res/layout/card_prefs_warranty.xml
@@ -1,43 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ style="@style/SettingsCard"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
- android:id="@+id/warranty_title"
- style="@style/SettingsTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
- android:text="@string/warranty_title"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
- <TextView
- android:id="@+id/warranty_thanks"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="8dp"
- android:text="@string/warranty_thanks"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="@+id/warranty_title"
- app:layout_constraintTop_toBottomOf="@+id/warranty_title" />
+ <TextView
+ android:id="@+id/warranty_title"
+ style="@style/SettingsTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:text="@string/warranty_title"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/warranty_license"
- style="@style/SettingsText"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="8dp"
- android:text="@string/warranty_license"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="@+id/warranty_thanks"
- app:layout_constraintStart_toStartOf="@+id/warranty_thanks"
- app:layout_constraintTop_toBottomOf="@+id/warranty_thanks" />
+ <TextView
+ android:id="@+id/warranty_thanks"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:layout_marginEnd="8dp"
+ android:text="@string/warranty_thanks"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@+id/warranty_title"
+ app:layout_constraintTop_toBottomOf="@+id/warranty_title" />
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+ <TextView
+ android:id="@+id/warranty_license"
+ style="@style/SettingsText"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="8dp"
+ android:text="@string/warranty_license"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="@+id/warranty_thanks"
+ app:layout_constraintStart_toStartOf="@+id/warranty_thanks"
+ app:layout_constraintTop_toBottomOf="@+id/warranty_thanks" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_entries.xml b/app/src/main/res/layout/fragment_entries.xml
index 7d3a755c..a25ccb83 100644
--- a/app/src/main/res/layout/fragment_entries.xml
+++ b/app/src/main/res/layout/fragment_entries.xml
@@ -13,56 +13,49 @@
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
- <ImageButton
- android:id="@+id/entries_back"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_back"
- app:layout_constraintBottom_toBottomOf="@+id/entries_toolbar"
- app:layout_constraintStart_toStartOf="@+id/entries_toolbar"
- app:layout_constraintTop_toTopOf="@+id/entries_toolbar" />
+ <ImageButton
+ android:id="@+id/entries_back"
+ style="@style/ToolbarButton"
+ android:layout_gravity="start|center_vertical"
+ android:src="@drawable/ic_back" />
- <EditText
- android:id="@+id/entries_search"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="20dp"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="20dp"
- android:layout_marginBottom="4dp"
- android:background="@android:color/transparent"
- android:elevation="8dp"
- android:hint="@string/entries_search_hint"
- android:importantForAutofill="no"
- android:includeFontPadding="false"
- android:inputType="text"
- android:textColor="@color/themeAccent"
- android:textColorHint="@color/themeAccent"
- android:textSize="20sp"
- app:layout_constraintBottom_toBottomOf="@+id/entries_toolbar"
- app:layout_constraintEnd_toStartOf="@+id/entries_mode"
- app:layout_constraintStart_toEndOf="@+id/entries_back"
- app:layout_constraintTop_toTopOf="@+id/entries_toolbar" />
+ <EditText
+ android:id="@+id/entries_search"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:layout_marginStart="32dp"
+ android:layout_marginTop="4dp"
+ android:layout_marginEnd="32dp"
+ android:layout_marginBottom="4dp"
+ android:background="@android:color/transparent"
+ android:hint="@string/entries_search_hint"
+ android:importantForAutofill="no"
+ android:includeFontPadding="false"
+ android:inputType="text"
+ android:textColor="@color/themeAccent"
+ android:textColorHint="@color/themeAccent"
+ android:textSize="20sp" />
- <ImageButton
- android:id="@+id/entries_mode"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_satellite"
- app:layout_constraintBottom_toBottomOf="@+id/entries_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/entries_toolbar"
- app:layout_constraintTop_toTopOf="@+id/entries_toolbar" />
+ <ImageButton
+ android:id="@+id/entries_mode"
+ style="@style/ToolbarButton"
+ android:layout_gravity="end|center_vertical"
+ android:src="@drawable/ic_satellite" />
+
+ </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/entries_list_card"
style="@style/ToolbarCard"
android:layout_width="0dp"
android:layout_height="0dp"
- android:layout_marginStart="7dp"
+ android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
- android:layout_marginEnd="7dp"
+ android:layout_marginEnd="8dp"
android:layout_marginBottom="3dp"
- android:backgroundTint="@color/surfaceBg"
android:clipChildren="true"
app:cardElevation="0dp"
app:layout_constraintBottom_toTopOf="@+id/entries_select_all"
@@ -72,20 +65,18 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/entries_recycler"
+ style="@style/ListRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- </androidx.cardview.widget.CardView>
+ <ProgressBar
+ android:id="@+id/entries_progress"
+ style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Large"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center" />
- <ProgressBar
- android:id="@+id/entries_progress"
- style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintBottom_toBottomOf="@+id/entries_list_card"
- app:layout_constraintEnd_toEndOf="@+id/entries_list_card"
- app:layout_constraintStart_toStartOf="@+id/entries_list_card"
- app:layout_constraintTop_toBottomOf="@+id/entries_toolbar" />
+ </androidx.cardview.widget.CardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/entries_select_all"
@@ -122,4 +113,4 @@
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/entries_select_all" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml
index 1f927827..1674d396 100644
--- a/app/src/main/res/layout/fragment_map.xml
+++ b/app/src/main/res/layout/fragment_map.xml
@@ -15,25 +15,21 @@
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
- <ImageButton
- android:id="@+id/map_back"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_back"
- app:layout_constraintBottom_toBottomOf="@+id/map_toolbar"
- app:layout_constraintStart_toStartOf="@+id/map_toolbar"
- app:layout_constraintTop_toTopOf="@+id/map_toolbar" />
+ <ImageButton
+ android:id="@+id/map_back"
+ style="@style/ToolbarButton"
+ android:layout_gravity="start|center_vertical"
+ android:src="@drawable/ic_back" />
- <TextView
- android:id="@+id/map_title"
- style="@style/ToolbarText"
- android:text="@string/map_title"
- app:layout_constraintBottom_toBottomOf="@+id/map_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/map_toolbar"
- app:layout_constraintHorizontal_bias="0.32"
- app:layout_constraintStart_toStartOf="@+id/map_toolbar"
- app:layout_constraintTop_toTopOf="@+id/map_toolbar" />
+ <TextView
+ android:id="@+id/map_title"
+ style="@style/ToolbarTitle"
+ android:layout_gravity="center"
+ android:text="@string/map_title" />
+
+ </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/map_card"
@@ -53,14 +49,13 @@
<org.osmdroid.views.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:elevation="16dp" />
+ android:layout_height="match_parent" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/map_data_name"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
@@ -89,15 +84,11 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/map_data_root"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/mapInfoLayout"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent">
+ android:layout_height="match_parent">
<TextView
android:id="@+id/map_data_lat"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
@@ -108,7 +99,7 @@
<TextView
android:id="@+id/map_data_lon"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
@@ -118,7 +109,7 @@
<TextView
android:id="@+id/map_data_qth"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
@@ -130,7 +121,7 @@
<TextView
android:id="@+id/map_data_alt"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
@@ -140,7 +131,7 @@
<TextView
android:id="@+id/map_data_dst"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pat_distance"
@@ -149,7 +140,7 @@
<TextView
android:id="@+id/map_data_vel"
- style="@style/MapInfoText"
+ style="@style/WorldMapText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pat_osm_vel"
@@ -160,7 +151,6 @@
</androidx.cardview.widget.CardView>
-
<ImageButton
android:id="@+id/map_btn_prev"
android:layout_width="48dp"
diff --git a/app/src/main/res/layout/fragment_passes.xml b/app/src/main/res/layout/fragment_passes.xml
index cc5fe829..54c9ad60 100644
--- a/app/src/main/res/layout/fragment_passes.xml
+++ b/app/src/main/res/layout/fragment_passes.xml
@@ -13,31 +13,26 @@
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
- <ImageButton
- android:id="@+id/passes_filter"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_filter"
- app:layout_constraintBottom_toBottomOf="@+id/passes_toolbar"
- app:layout_constraintStart_toStartOf="@+id/passes_toolbar"
- app:layout_constraintTop_toTopOf="@+id/passes_toolbar" />
+ <ImageButton
+ android:id="@+id/passes_filter"
+ style="@style/ToolbarButton"
+ android:layout_gravity="start|center_vertical"
+ android:src="@drawable/ic_filter" />
- <TextView
- android:id="@+id/passes_timer"
- style="@style/ToolbarTimer"
- app:layout_constraintBottom_toBottomOf="@+id/passes_toolbar"
- app:layout_constraintEnd_toStartOf="@+id/passes_settings"
- app:layout_constraintStart_toEndOf="@+id/passes_filter"
- app:layout_constraintTop_toTopOf="@+id/passes_toolbar" />
+ <TextView
+ android:id="@+id/passes_timer"
+ style="@style/ToolbarTimer"
+ android:layout_gravity="center" />
- <ImageButton
- android:id="@+id/passes_settings"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_prefs"
- app:layout_constraintBottom_toBottomOf="@+id/passes_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/passes_toolbar"
- app:layout_constraintTop_toTopOf="@+id/passes_toolbar" />
+ <ImageButton
+ android:id="@+id/passes_settings"
+ style="@style/ToolbarButton"
+ android:layout_gravity="end|center_vertical"
+ android:src="@drawable/ic_prefs" />
+
+ </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/passes_list_card"
@@ -48,7 +43,6 @@
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
- android:backgroundTint="@color/surfaceBg"
android:clipChildren="true"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent"
@@ -63,23 +57,22 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/passes_list"
+ style="@style/ListRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
- </androidx.cardview.widget.CardView>
- <TextView
- android:id="@+id/passes_error"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/passes_error"
- android:textSize="20sp"
- android:visibility="invisible"
- app:layout_constraintBottom_toBottomOf="@+id/passes_list_card"
- app:layout_constraintEnd_toEndOf="@+id/passes_list_card"
- app:layout_constraintStart_toStartOf="@+id/passes_list_card"
- app:layout_constraintTop_toTopOf="@+id/passes_list_card" />
+ <TextView
+ android:id="@+id/passes_error"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/passes_error"
+ android:textSize="20sp"
+ android:visibility="invisible" />
+
+ </androidx.cardview.widget.CardView>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/passes_fab"
diff --git a/app/src/main/res/layout/fragment_radar.xml b/app/src/main/res/layout/fragment_radar.xml
index 1fb65fe6..a3028f00 100644
--- a/app/src/main/res/layout/fragment_radar.xml
+++ b/app/src/main/res/layout/fragment_radar.xml
@@ -1,7 +1,6 @@
<?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/radar_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true">
@@ -14,31 +13,38 @@
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
- <ImageButton
- android:id="@+id/radar_back"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_back"
- app:layout_constraintBottom_toBottomOf="@+id/radar_toolbar"
- app:layout_constraintStart_toStartOf="@+id/radar_toolbar"
- app:layout_constraintTop_toTopOf="@+id/radar_toolbar" />
+ <ImageButton
+ android:id="@+id/radar_back"
+ style="@style/ToolbarButton"
+ android:layout_gravity="start|center_vertical"
+ android:src="@drawable/ic_back" />
+
+ <TextView
+ android:id="@+id/radar_timer"
+ style="@style/ToolbarTimer"
+ android:layout_gravity="center" />
+
+ <ImageButton
+ android:id="@+id/radar_map"
+ style="@style/ToolbarButton"
+ android:layout_gravity="end|center_vertical"
+ android:src="@drawable/ic_map" />
+
+ </androidx.cardview.widget.CardView>
<TextView
- android:id="@+id/radar_timer"
- style="@style/ToolbarTimer"
- app:layout_constraintBottom_toBottomOf="@+id/radar_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/radar_toolbar"
- app:layout_constraintStart_toStartOf="@+id/radar_toolbar"
- app:layout_constraintTop_toTopOf="@+id/radar_toolbar" />
-
- <ImageButton
- android:id="@+id/radar_map"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_map"
- app:layout_constraintBottom_toBottomOf="@+id/radar_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/radar_toolbar"
- app:layout_constraintTop_toTopOf="@+id/radar_toolbar" />
+ android:id="@+id/radar_name"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
+ android:gravity="center"
+ android:textSize="16sp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/radar_toolbar" />
<androidx.cardview.widget.CardView
android:id="@+id/radar_card"
@@ -46,96 +52,95 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
- android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:elevation="0dp"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/radar_toolbar" />
-
- <FrameLayout
- android:id="@+id/radar_frame"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:elevation="16dp"
- app:layout_constraintBottom_toBottomOf="@+id/radar_card"
- app:layout_constraintDimensionRatio=""
- app:layout_constraintEnd_toEndOf="@+id/radar_card"
- app:layout_constraintStart_toStartOf="@+id/radar_card"
- app:layout_constraintTop_toTopOf="@+id/radar_card" />
+ app:layout_constraintTop_toBottomOf="@+id/radar_name" />
<TextView
android:id="@+id/radar_az"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
+ android:layout_marginTop="4dp"
+ android:elevation="8dp"
android:text="@string/pat_azimuth"
android:textSize="15sp"
- app:layout_constraintStart_toStartOf="@+id/radar_frame"
- app:layout_constraintTop_toTopOf="@+id/radar_frame" />
+ app:layout_constraintStart_toStartOf="@+id/radar_card"
+ app:layout_constraintTop_toTopOf="@+id/radar_card" />
<TextView
android:id="@+id/radar_el"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
+ android:elevation="8dp"
android:text="@string/pat_elevation"
android:textSize="15sp"
- app:layout_constraintEnd_toEndOf="@+id/radar_frame"
- app:layout_constraintTop_toTopOf="@+id/radar_frame" />
+ app:layout_constraintEnd_toEndOf="@+id/radar_card"
+ app:layout_constraintTop_toTopOf="@+id/radar_card" />
<TextView
android:id="@+id/radar_alt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
+ android:layout_marginBottom="4dp"
+ android:elevation="8dp"
android:text="@string/pat_altitude"
android:textSize="15sp"
- app:layout_constraintBottom_toBottomOf="@+id/radar_frame"
- app:layout_constraintStart_toStartOf="@+id/radar_frame" />
+ app:layout_constraintBottom_toBottomOf="@+id/radar_card"
+ app:layout_constraintStart_toStartOf="@+id/radar_card" />
<TextView
android:id="@+id/radar_dst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
+ android:layout_marginBottom="4dp"
+ android:elevation="8dp"
android:text="@string/pat_distance"
android:textSize="15sp"
- app:layout_constraintBottom_toBottomOf="@+id/radar_frame"
- app:layout_constraintEnd_toEndOf="@+id/radar_frame" />
+ app:layout_constraintBottom_toBottomOf="@+id/radar_card"
+ app:layout_constraintEnd_toEndOf="@+id/radar_card" />
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/radar_recycler"
+ <androidx.cardview.widget.CardView
+ android:id="@+id/radar_list_card"
+ style="@style/ToolbarCard"
android:layout_width="0dp"
android:layout_height="0dp"
- android:overScrollMode="never"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginBottom="8dp"
+ android:clipChildren="true"
+ app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/radar_name" />
+ app:layout_constraintTop_toBottomOf="@+id/radar_recycler_msg">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/radar_recycler"
+ style="@style/ListRecycler"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ </androidx.cardview.widget.CardView>
<TextView
android:id="@+id/radar_recycler_msg"
android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="8dp"
android:gravity="center"
android:text="@string/trans_no_data"
- android:textSize="15sp"
- android:visibility="invisible"
+ android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@+id/radar_recycler" />
+ app:layout_constraintTop_toBottomOf="@+id/radar_card" />
- <TextView
- android:id="@+id/radar_name"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="0dp"
- android:gravity="center"
- android:textSize="15sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_bias="0.0"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/radar_frame" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
index e0a5e76e..f467c379 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -12,24 +12,21 @@
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent">
- <ImageButton
- android:id="@+id/prefs_back"
- style="@style/ToolbarButton"
- android:src="@drawable/ic_back"
- app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
- app:layout_constraintStart_toStartOf="@+id/prefs_toolbar"
- app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
+ <ImageButton
+ android:id="@+id/prefs_back"
+ style="@style/ToolbarButton"
+ android:layout_gravity="start|center_vertical"
+ android:src="@drawable/ic_back" />
- <TextView
- android:id="@+id/prefs_title"
- style="@style/ToolbarText"
- android:layout_marginStart="20dp"
- android:text="@string/settings_title"
- app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
- app:layout_constraintStart_toEndOf="@+id/prefs_back"
- app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
+ <TextView
+ android:id="@+id/prefs_title"
+ style="@style/ToolbarTitle"
+ android:layout_gravity="center"
+ android:text="@string/settings_title" />
+
+ </androidx.cardview.widget.CardView>
<ScrollView
android:layout_width="0dp"
@@ -37,8 +34,8 @@
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
- android:clipChildren="true"
- android:scrollbars="none"
+ style="@style/ListRecycler"
+ android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -48,91 +45,66 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_info"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_info"
+ layout="@layout/card_prefs_about"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
-
- <include
- android:id="@+id/prefs_info"
- layout="@layout/card_prefs_about" />
+ app:layout_constraintTop_toTopOf="parent" />
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_location"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_location"
+ layout="@layout/card_prefs_location"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_info">
-
- <include
- android:id="@+id/prefs_location"
- layout="@layout/card_prefs_location" />
+ app:layout_constraintTop_toBottomOf="@+id/prefs_info" />
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_data"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_data"
+ layout="@layout/card_prefs_update"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_location">
-
- <include
- android:id="@+id/prefs_data"
- layout="@layout/card_prefs_update" />
+ app:layout_constraintTop_toBottomOf="@+id/prefs_location" />
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_tracking"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_tracking"
+ layout="@layout/card_prefs_tracking"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_data">
-
- <include
- android:id="@+id/prefs_tracking"
- layout="@layout/card_prefs_tracking" />
+ app:layout_constraintTop_toBottomOf="@+id/prefs_data" />
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_other"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_other"
+ layout="@layout/card_prefs_other"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_tracking">
-
- <include
- android:id="@+id/prefs_other"
- layout="@layout/card_prefs_other" />
+ app:layout_constraintTop_toBottomOf="@+id/prefs_tracking" />
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_warranty"
- style="@style/SettingsCard"
+ <include
+ android:id="@+id/prefs_warranty"
+ layout="@layout/card_prefs_warranty"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_marginTop="8dp"
- android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_other">
-
- <include
- android:id="@+id/prefs_warranty"
- layout="@layout/card_prefs_warranty" />
-
- </androidx.cardview.widget.CardView>
+ app:layout_constraintTop_toBottomOf="@+id/prefs_other" />
</androidx.constraintlayout.widget.ConstraintLayout>
+
</ScrollView>
+
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_entry.xml b/app/src/main/res/layout/item_entry.xml
index fa182386..f0e5466d 100644
--- a/app/src/main/res/layout/item_entry.xml
+++ b/app/src/main/res/layout/item_entry.xml
@@ -1,15 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/entry_root"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="1dp"
- android:layout_marginEnd="1dp"
- android:layout_marginBottom="1dp"
- app:cardBackgroundColor="@color/surfaceCard"
- app:cardCornerRadius="@dimen/card_corner"
- app:cardElevation="0dp">
+ android:id="@+id/entry_card"
+ style="@style/ListItemCard">
<CheckBox
android:id="@+id/entry_checkbox"
diff --git a/app/src/main/res/layout/item_pass.xml b/app/src/main/res/layout/item_pass.xml
index a7ba1c39..39a301bf 100644
--- a/app/src/main/res/layout/item_pass.xml
+++ b/app/src/main/res/layout/item_pass.xml
@@ -2,12 +2,7 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pass_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="1dp"
- android:backgroundTint="@color/surfaceCard"
- app:cardCornerRadius="@dimen/card_corner"
- app:cardElevation="0dp">
+ style="@style/ListItemCard">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pass_root"
@@ -108,4 +103,5 @@
app:layout_constraintTop_toBottomOf="@+id/pass_elev" />
</androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.cardview.widget.CardView>
+
+</androidx.cardview.widget.CardView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_source.xml b/app/src/main/res/layout/item_source.xml
index 26436df3..1b3157ac 100644
--- a/app/src/main/res/layout/item_source.xml
+++ b/app/src/main/res/layout/item_source.xml
@@ -35,4 +35,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/source_input" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_trans.xml b/app/src/main/res/layout/item_trans.xml
index da790ed0..706ba2cd 100644
--- a/app/src/main/res/layout/item_trans.xml
+++ b/app/src/main/res/layout/item_trans.xml
@@ -2,10 +2,8 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/trans_card"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardBackgroundColor="@color/surfaceCard"
- app:cardCornerRadius="0dp">
+ style="@style/ListItemCard"
+ android:layout_marginBottom="1dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/trans_root"
@@ -106,4 +104,5 @@
app:layout_constraintStart_toEndOf="@+id/trans_mode" />
</androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.cardview.widget.CardView>
+
+</androidx.cardview.widget.CardView>
\ 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 3d1f3c3f..c8013f51 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -30,11 +30,6 @@
android:id="@+id/nav_radar"
android:name="com.rtbishop.look4sat.presentation.radarScreen.RadarFragment"
tools:layout="@layout/fragment_radar">
-<!-- <action-->
-<!-- android:id="@+id/action_radar_to_passes"-->
-<!-- app:destination="@id/nav_passes"-->
-<!-- app:popUpTo="@id/nav_passes"-->
-<!-- app:popUpToInclusive="true" />-->
<action
android:id="@+id/action_radar_to_map"
app:destination="@id/nav_map" />
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 3cf569a2..0c20d14a 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <dimen name="card_elevation">0dp</dimen>
- <dimen name="card_corner">8dp</dimen>
- <dimen name="card_corner_zero">0dp</dimen>
+ <dimen name="card_elev_low">0dp</dimen>
+ <dimen name="card_elev_high">8dp</dimen>
+ <dimen name="card_corner_low">0dp</dimen>
+ <dimen name="card_corner_high">8dp</dimen>
</resources>
\ 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 3d9bb361..99a2f570 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -17,6 +17,7 @@
<item name="android:windowBackground">@color/surfaceBg</item>
<item name="android:navigationBarColor">@color/surfaceBg</item>
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
+ <item name="android:listDivider">@drawable/item_divider</item>
</style>
<style name="AppButton">
@@ -29,36 +30,26 @@
<item name="android:textSize">16sp</item>
</style>
- <style name="DialogButton">
- <item name="android:backgroundTint">@color/surfaceButton</item>
- <item name="android:ellipsize">end</item>
- <item name="android:maxLines">1</item>
- <item name="android:textAllCaps">false</item>
- <item name="android:textColor">@color/themeAccent</item>
- <item name="android:textSize">16sp</item>
- </style>
-
- <style name="DialogText">
- <item name="android:layout_width">wrap_content</item>
+ <style name="ListItemCard">
+ <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textColor">@color/themeLight</item>
- <item name="android:textSize">16sp</item>
+ <item name="cardBackgroundColor">@color/surfaceCard</item>
+ <item name="cardCornerRadius">@dimen/card_corner_low</item>
+ <item name="cardElevation">@dimen/card_elev_low</item>
</style>
- <style name="DialogTitle">
- <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">16sp</item>
+ <style name="ListRecycler">
+ <item name="android:animateLayoutChanges">false</item>
+ <item name="android:overScrollMode">never</item>
+ <item name="android:scrollbars">none</item>
</style>
<style name="ToolbarCard">
- <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_width">0dp</item>
<item name="android:layout_height">48dp</item>
- <item name="android:elevation">0dp</item>
- <item name="cardElevation">0dp</item>
- <item name="cardBackgroundColor">@color/surfaceToolbar</item>
- <item name="cardCornerRadius">@dimen/card_corner</item>
+ <item name="cardElevation">@dimen/card_elev_low</item>
+ <item name="cardBackgroundColor">@color/surfaceCard</item>
+ <item name="cardCornerRadius">@dimen/card_corner_high</item>
</style>
<style name="ToolbarButton">
@@ -69,36 +60,41 @@
<item name="android:tint">@color/themeLight</item>
</style>
- <style name="ToolbarText">
+ <style name="ToolbarTimer">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:elevation">8dp</item>
<item name="android:includeFontPadding">false</item>
- <item name="android:textColor">@color/themeLight</item>
- <item name="android:textSize">20sp</item>
+ <item name="android:text">@string/timer_zero</item>
+ <item name="android:textColor">@color/themeAccent</item>
+ <item name="android:textSize">38sp</item>
+ <item name="android:textStyle">bold</item>
</style>
- <style name="ToolbarTimer">
+ <style name="ToolbarTitle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:elevation">8dp</item>
<item name="android:includeFontPadding">false</item>
- <item name="android:text">@string/timer_zero</item>
- <item name="android:textColor">@color/themeAccent</item>
- <item name="android:textSize">38sp</item>
- <item name="android:textStyle">bold</item>
+ <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textSize">20sp</item>
+ </style>
+
+ <style name="WorldMapText">
+ <item name="android:textSize">16sp</item>
+ <item name="android:textColor">@color/themeLight</item>
</style>
- <style name="MapInfoText">
+ <style name="WorldMapTitle">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/themeLight</item>
</style>
<style name="SettingsCard">
- <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="cardBackgroundColor">@color/surfaceCard</item>
- <item name="cardCornerRadius">@dimen/card_corner</item>
+ <item name="cardCornerRadius">@dimen/card_corner_high</item>
</style>
<style name="SettingsText">
@@ -112,4 +108,27 @@
<item name="android:textColor">@color/themeAccent</item>
</style>
+ <style name="DialogButton">
+ <item name="android:backgroundTint">@color/surfaceButton</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:textColor">@color/themeAccent</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="DialogText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="DialogTitle">
+ <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">16sp</item>
+ </style>
+
</resources>
\ No newline at end of file