mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Added BottomAppBar to several fragments, various ui changes
This commit is contained in:
1 parent
64b5010a44
commit
bdc0000476
30 files changed
+513
-277
No files matched your search
@@ -24,8 +24,6 @@ import androidx.activity.viewModels
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.ui.NavigationUI
|
||||
import androidx.navigation.ui.setupWithNavController
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.ActivityMainBinding
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
@@ -43,14 +41,14 @@ class MainActivity : AppCompatActivity() {
|
||||
val binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
val host = supportFragmentManager.findFragmentById(R.id.navigation_host) as NavHostFragment
|
||||
setContentView(binding.root)
|
||||
binding.navigationBar.apply {
|
||||
setupWithNavController(host.navController)
|
||||
setOnItemSelectedListener { item ->
|
||||
NavigationUI.onNavDestinationSelected(item, host.navController)
|
||||
host.navController.popBackStack(item.itemId, inclusive = false)
|
||||
true
|
||||
}
|
||||
}
|
||||
// binding.navigationBar.apply {
|
||||
// setupWithNavController(host.navController)
|
||||
// setOnItemSelectedListener { item ->
|
||||
// NavigationUI.onNavDestinationSelected(item, host.navController)
|
||||
// host.navController.popBackStack(item.itemId, inclusive = false)
|
||||
// true
|
||||
// }
|
||||
// }
|
||||
mainViewModel.calculatePasses()
|
||||
}
|
||||
}
|
||||
+9
-4
@@ -32,6 +32,7 @@ import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.FragmentEntriesBinding
|
||||
import com.rtbishop.look4sat.domain.model.DataState
|
||||
import com.rtbishop.look4sat.domain.model.SatItem
|
||||
import com.rtbishop.look4sat.presentation.setNavResult
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
@@ -59,11 +60,15 @@ class EntriesFragment : Fragment(R.layout.fragment_entries) {
|
||||
addItemDecoration(itemDecoration)
|
||||
(itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
|
||||
}
|
||||
entriesBack.setOnClickListener { findNavController().navigateUp() }
|
||||
entriesBackBtn.setOnClickListener { findNavController().navigateUp() }
|
||||
entriesSearch.doOnTextChanged { text, _, _, _ -> viewModel.setQuery(text.toString()) }
|
||||
entriesMode.setOnClickListener { showModesDialog() }
|
||||
entriesSelectAll.setOnClickListener { viewModel.selectCurrentItems() }
|
||||
entriesAccept.setOnClickListener { viewModel.saveSelection() }
|
||||
entriesModesBtn.setOnClickListener { showModesDialog() }
|
||||
entriesSelectBtn.setOnClickListener { viewModel.selectCurrentItems(true) }
|
||||
entriesClearBtn.setOnClickListener { viewModel.selectCurrentItems(false) }
|
||||
entriesAcceptBtn.setOnClickListener {
|
||||
setNavResult("selection", viewModel.saveSelection())
|
||||
findNavController().popBackStack()
|
||||
}
|
||||
}
|
||||
viewModel.satData.observe(viewLifecycleOwner) { satData ->
|
||||
handleSatData(satData, binding, adapter)
|
||||
|
||||
+10
-9
@@ -41,13 +41,13 @@ class EntriesViewModel @Inject constructor(
|
||||
private val itemsWithQuery = currentQuery.switchMap { query ->
|
||||
itemsWithModes.map { items -> filterByQuery(items, query) }
|
||||
}
|
||||
private var shouldSelectAll = true
|
||||
// private var shouldSelectAll = true
|
||||
val satData = itemsWithQuery.map { items -> DataState.Success(items) }
|
||||
|
||||
fun selectCurrentItems() {
|
||||
fun selectCurrentItems(selectAll: Boolean) {
|
||||
itemsWithQuery.value?.let { itemsWithQuery ->
|
||||
updateSelection(itemsWithQuery.map { item -> item.catnum }, shouldSelectAll)
|
||||
shouldSelectAll = shouldSelectAll.not()
|
||||
updateSelection(itemsWithQuery.map { item -> item.catnum }, selectAll)
|
||||
// shouldSelectAll = shouldSelectAll.not()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,15 +61,16 @@ class EntriesViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
fun setQuery(query: String) {
|
||||
shouldSelectAll = true
|
||||
// shouldSelectAll = true
|
||||
currentQuery.value = query
|
||||
}
|
||||
|
||||
fun saveSelection() {
|
||||
itemsFromRepo.value?.let { itemsAll ->
|
||||
fun saveSelection(): List<Int> {
|
||||
return itemsFromRepo.value?.let { itemsAll ->
|
||||
val filteredItems = itemsAll.filter { item -> item.isSelected }
|
||||
repository.setEntriesSelection(filteredItems.map { item -> item.catnum })
|
||||
}
|
||||
// repository.setEntriesSelection(filteredItems.map { item -> item.catnum })
|
||||
filteredItems.map { item -> item.catnum }
|
||||
} ?: emptyList()
|
||||
}
|
||||
|
||||
override fun updateSelection(catNums: List<Int>, isSelected: Boolean) {
|
||||
|
||||
@@ -92,9 +92,9 @@ class MapFragment : Fragment(R.layout.fragment_map) {
|
||||
// add overlays: 0 - GSP, 1 - SatTrack, 2 - SatFootprint, 3 - SatIcons
|
||||
overlays.addAll(Array(4) { FolderOverlay() })
|
||||
}
|
||||
mapBack.setOnClickListener { findNavController().navigateUp() }
|
||||
mapBtnPrev.setOnClickListener { viewModel.scrollSelection(true) }
|
||||
mapBtnNext.setOnClickListener { viewModel.scrollSelection(false) }
|
||||
mapBackBtn.setOnClickListener { findNavController().navigateUp() }
|
||||
mapPrevBtn.setOnClickListener { viewModel.scrollSelection(true) }
|
||||
mapNextBtn.setOnClickListener { viewModel.scrollSelection(false) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+40
-25
@@ -24,6 +24,7 @@ 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
|
||||
@@ -51,59 +52,59 @@ class PassesFragment : Fragment(R.layout.fragment_passes), PassesAdapter.PassesC
|
||||
val layoutManager = LinearLayoutManager(context)
|
||||
val itemDecoration = DividerItemDecoration(context, layoutManager.orientation)
|
||||
binding.run {
|
||||
passesList.apply {
|
||||
passesRecycler.apply {
|
||||
setHasFixedSize(true)
|
||||
this.adapter = adapter
|
||||
this.layoutManager = layoutManager
|
||||
addItemDecoration(itemDecoration)
|
||||
(itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
|
||||
addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
if (dy > 0 && passesFab.visibility == View.VISIBLE) passesFab.hide()
|
||||
else if (dy < 0 && passesFab.visibility != View.VISIBLE) passesFab.show()
|
||||
}
|
||||
passesSwipe.apply {
|
||||
setColorSchemeResources(R.color.surfaceToolbar)
|
||||
setProgressBackgroundColorSchemeResource(R.color.themeAccent)
|
||||
setOnRefreshListener { passesViewModel.forceCalculation() }
|
||||
})
|
||||
}
|
||||
passesFilter.setOnClickListener { navigateToPassPrefs() }
|
||||
passesSettings.setOnClickListener { navigateToSettings() }
|
||||
passesRefreshBtn.setOnClickListener { refreshPasses() }
|
||||
passesMapBtn.setOnClickListener { navigateToMap() }
|
||||
passesFilterBtn.setOnClickListener { navigateToPassPrefs() }
|
||||
passesFab.setOnClickListener { navigateToEntries() }
|
||||
passesSettingsBtn.setOnClickListener { navigateToSettings() }
|
||||
}
|
||||
passesViewModel.passes.observe(viewLifecycleOwner) { passesResult ->
|
||||
handleNewPasses(passesResult, adapter, binding)
|
||||
handleNewPasses(passesResult, adapter)
|
||||
}
|
||||
getNavResult<Pair<Int, Double>>(R.id.nav_passes, "prefs") { prefs ->
|
||||
passesViewModel.saveCalculationPrefs(prefs.first, prefs.second)
|
||||
passesViewModel.forceCalculation(prefs.first, prefs.second)
|
||||
}
|
||||
getNavResult<List<Int>>(R.id.nav_passes, "selection") { selection ->
|
||||
passesViewModel.saveSelectionAndRecalc(selection)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleNewPasses(
|
||||
dataState: DataState<List<SatPass>>,
|
||||
passesAdapter: PassesAdapter,
|
||||
binding: FragmentPassesBinding
|
||||
) {
|
||||
when (dataState) {
|
||||
private fun handleNewPasses(state: DataState<List<SatPass>>, adapter: PassesAdapter) {
|
||||
when (state) {
|
||||
is DataState.Success -> {
|
||||
passesAdapter.submitList(dataState.data)
|
||||
adapter.submitList(state.data)
|
||||
binding.apply {
|
||||
passesSwipe.isRefreshing = false
|
||||
passesList.visibility = View.VISIBLE
|
||||
passesError.visibility = View.INVISIBLE
|
||||
passesRecycler.visibility = View.VISIBLE
|
||||
passesErrorMsg.visibility = View.INVISIBLE
|
||||
}
|
||||
tickMainTimer(dataState.data, binding)
|
||||
tickMainTimer(state.data, binding)
|
||||
}
|
||||
is DataState.Loading -> {
|
||||
binding.apply {
|
||||
passesTimer.text = 0L.toTimerString()
|
||||
passesSwipe.isRefreshing = true
|
||||
passesList.visibility = View.INVISIBLE
|
||||
passesError.visibility = View.INVISIBLE
|
||||
passesRecycler.visibility = View.INVISIBLE
|
||||
passesErrorMsg.visibility = View.INVISIBLE
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
binding.apply {
|
||||
passesTimer.text = 0L.toTimerString()
|
||||
passesSwipe.isRefreshing = false
|
||||
passesList.visibility = View.INVISIBLE
|
||||
passesError.visibility = View.VISIBLE
|
||||
passesRecycler.visibility = View.INVISIBLE
|
||||
passesErrorMsg.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,11 +127,25 @@ class PassesFragment : Fragment(R.layout.fragment_passes), PassesAdapter.PassesC
|
||||
}
|
||||
}
|
||||
|
||||
private fun refreshPasses() {
|
||||
passesViewModel.forceCalculation()
|
||||
}
|
||||
|
||||
private fun navigateToMap() {
|
||||
val direction = PassesFragmentDirections.actionGlobalMapFragment()
|
||||
findNavController().navigate(direction)
|
||||
}
|
||||
|
||||
private fun navigateToPassPrefs() {
|
||||
val direction = PassesFragmentDirections.actionPassesToPassPrefs()
|
||||
findNavController().navigate(direction)
|
||||
}
|
||||
|
||||
private fun navigateToEntries() {
|
||||
val direction = PassesFragmentDirections.actionGlobalEntriesFragment()
|
||||
findNavController().navigate(direction)
|
||||
}
|
||||
|
||||
private fun navigateToSettings() {
|
||||
val direction = PassesFragmentDirections.actionGlobalSettingsFragment()
|
||||
findNavController().navigate(direction)
|
||||
|
||||
@@ -57,6 +57,13 @@ class PassesViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun saveSelectionAndRecalc(selection: List<Int>) {
|
||||
viewModelScope.launch {
|
||||
repository.setEntriesSelection(selection)
|
||||
forceCalculation()
|
||||
}
|
||||
}
|
||||
|
||||
fun forceCalculation(
|
||||
hoursAhead: Int = settings.getHoursAhead(),
|
||||
minElevation: Double = settings.getMinElevation(),
|
||||
|
||||
@@ -53,7 +53,7 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
|
||||
|
||||
private fun setupViews() {
|
||||
val context = requireContext()
|
||||
val adapter = RadiosAdapter()
|
||||
val adapter = RadioAdapter()
|
||||
val layoutManager = LinearLayoutManager(context)
|
||||
val itemDecoration = DividerItemDecoration(context, layoutManager.orientation)
|
||||
binding.run {
|
||||
@@ -68,7 +68,7 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupObservers(radiosAdapter: RadiosAdapter) {
|
||||
private fun setupObservers(radioAdapter: RadioAdapter) {
|
||||
viewModel.getPass(args.catNum, args.aosTime).observe(viewLifecycleOwner) { pass ->
|
||||
radarView = RadarView(requireContext()).apply {
|
||||
setShowAim(preferences.getUseCompass())
|
||||
@@ -82,7 +82,7 @@ class RadarFragment : Fragment(R.layout.fragment_radar) {
|
||||
}
|
||||
viewModel.transmitters.observe(viewLifecycleOwner) { list ->
|
||||
if (list.isNotEmpty()) {
|
||||
radiosAdapter.submitList(list)
|
||||
radioAdapter.submitList(list)
|
||||
binding.radarRecyclerMsg.text = getString(R.string.trans_data)
|
||||
} else {
|
||||
binding.radarRecyclerMsg.text = getString(R.string.trans_no_data)
|
||||
|
||||
+21
-28
@@ -23,11 +23,11 @@ import androidx.recyclerview.widget.AsyncListDiffer
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.ItemTransBinding
|
||||
import com.rtbishop.look4sat.databinding.ItemRadioBinding
|
||||
import com.rtbishop.look4sat.domain.model.SatRadio
|
||||
import java.util.*
|
||||
|
||||
class RadiosAdapter : RecyclerView.Adapter<RadiosAdapter.TransHolder>() {
|
||||
class RadioAdapter : RecyclerView.Adapter<RadioAdapter.TransHolder>() {
|
||||
|
||||
private val diffCallback = object : DiffUtil.ItemCallback<SatRadio>() {
|
||||
override fun areItemsTheSame(oldItem: SatRadio, newItem: SatRadio): Boolean {
|
||||
@@ -40,9 +40,7 @@ class RadiosAdapter : RecyclerView.Adapter<RadiosAdapter.TransHolder>() {
|
||||
}
|
||||
private val differ = AsyncListDiffer(this, diffCallback)
|
||||
|
||||
fun submitList(radios: List<SatRadio>) {
|
||||
differ.submitList(radios)
|
||||
}
|
||||
fun submitList(items: List<SatRadio>) = differ.submitList(items)
|
||||
|
||||
override fun getItemCount() = differ.currentList.size
|
||||
|
||||
@@ -54,56 +52,51 @@ class RadiosAdapter : RecyclerView.Adapter<RadiosAdapter.TransHolder>() {
|
||||
holder.bind(differ.currentList[position])
|
||||
}
|
||||
|
||||
class TransHolder private constructor(private val binding: ItemTransBinding) :
|
||||
class TransHolder private constructor(private val binding: ItemRadioBinding) :
|
||||
RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
private val divider = 1000000f
|
||||
private val strNo = itemView.context.getString(R.string.no)
|
||||
private val strYes = itemView.context.getString(R.string.yes)
|
||||
private val stringYes = itemView.context.getString(R.string.yes)
|
||||
private val stringNo = itemView.context.getString(R.string.no)
|
||||
private val link = itemView.context.getString(R.string.trans_link_low)
|
||||
private val linkNull = itemView.context.getString(R.string.trans_no_link)
|
||||
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)
|
||||
private val isInverted = itemView.context.getString(R.string.trans_inverted)
|
||||
private val inverted = itemView.context.getString(R.string.trans_inverted)
|
||||
|
||||
fun bind(radio: SatRadio) {
|
||||
binding.transDesc.text = radio.info
|
||||
|
||||
binding.run {
|
||||
radioInfo.text = radio.info
|
||||
radio.downlink.let { downlink ->
|
||||
if (downlink != null) {
|
||||
val downlinkFreq = downlink / divider
|
||||
binding.transDownlink.text =
|
||||
String.format(Locale.ENGLISH, formatLink, downlinkFreq)
|
||||
radioDownlink.text = String.format(Locale.ENGLISH, link, downlink / divider)
|
||||
} else {
|
||||
binding.transDownlink.text = formatLinkNull
|
||||
radioDownlink.text = linkNull
|
||||
}
|
||||
}
|
||||
|
||||
radio.uplink.let { uplink ->
|
||||
if (uplink != null) {
|
||||
val uplinkFreq = uplink / divider
|
||||
binding.transUplink.text = String.format(Locale.ENGLISH, formatLink, uplinkFreq)
|
||||
radioUplink.text = String.format(Locale.ENGLISH, link, uplink / divider)
|
||||
} else {
|
||||
binding.transUplink.text = formatLinkNull
|
||||
radioUplink.text = linkNull
|
||||
}
|
||||
}
|
||||
|
||||
if (radio.mode != null) {
|
||||
binding.transMode.text = String.format(mode, radio.mode)
|
||||
radioMode.text = String.format(mode, radio.mode)
|
||||
} else {
|
||||
binding.transMode.text = String.format(mode, strNo)
|
||||
radioMode.text = String.format(mode, stringNo)
|
||||
}
|
||||
|
||||
if (radio.isInverted) {
|
||||
binding.transInverted.text = String.format(isInverted, strYes)
|
||||
radioInverted.text = String.format(inverted, stringYes)
|
||||
} else {
|
||||
binding.transInverted.text = String.format(isInverted, strNo)
|
||||
radioInverted.text = String.format(inverted, stringNo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun from(parent: ViewGroup): TransHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
return TransHolder(ItemTransBinding.inflate(inflater, parent, false))
|
||||
return TransHolder(ItemRadioBinding.inflate(inflater, parent, false))
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -27,6 +27,7 @@ import android.widget.EditText
|
||||
import android.widget.Toast
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
@@ -71,6 +72,11 @@ class SettingsFragment : Fragment(R.layout.fragment_settings) {
|
||||
}
|
||||
|
||||
private fun setupViews() {
|
||||
binding.settingsScroll.apply {
|
||||
setOnScrollChangeListener(NestedScrollView.OnScrollChangeListener { _, _, y, _, newY ->
|
||||
if (y > newY) binding.settingsFab.hide() else binding.settingsFab.show()
|
||||
})
|
||||
}
|
||||
binding.prefsBack.setOnClickListener { findNavController().navigateUp() }
|
||||
setupAboutCard()
|
||||
setupDataCard()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16,5v14l-11,-7z" />
|
||||
</vector>
|
||||
File renamed without changes.
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,5v14H5V5h14m0,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7.58,4.08L6.15,2.65C3.75,4.48 2.17,7.3 2.03,10.5h2c0.15,-2.65 1.51,-4.97 3.55,-6.42zM19.97,10.5h2c-0.15,-3.2 -1.73,-6.02 -4.12,-7.85l-1.42,1.43c2.02,1.45 3.39,3.77 3.54,6.42zM18,11c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2v-5zM12,22c0.14,0 0.27,-0.01 0.4,-0.04 0.65,-0.14 1.18,-0.58 1.44,-1.18 0.1,-0.24 0.15,-0.5 0.15,-0.78h-4c0.01,1.1 0.9,2 2.01,2z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10s10,-4.48 10,-10S17.52,2 12,2zM9.5,16.5v-9l7,4.5L9.5,16.5z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
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>
|
||||
@@ -20,6 +20,7 @@
|
||||
android:id="@+id/navigation_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:visibility="gone"
|
||||
app:itemBackground="@color/surfaceToolbar"
|
||||
app:labelVisibilityMode="unlabeled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/entries_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/entries_toolbar"
|
||||
android:id="@+id/entries_top_bar"
|
||||
style="@style/ToolbarCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/entries_back"
|
||||
android:id="@+id/entries_back_btn"
|
||||
style="@style/ToolbarButton"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:src="@drawable/ic_back" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/entries_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginStart="52dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginEnd="52dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center"
|
||||
android:hint="@string/entries_search_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:includeFontPadding="false"
|
||||
@@ -40,7 +40,7 @@
|
||||
android:textSize="@dimen/text_size_large" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/entries_mode"
|
||||
android:id="@+id/entries_modes_btn"
|
||||
style="@style/ToolbarButton"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:src="@drawable/ic_satellite" />
|
||||
@@ -48,18 +48,13 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/entries_list_card"
|
||||
style="@style/SurfaceCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="64dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/entries_select_all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/entries_toolbar">
|
||||
android:layout_marginBottom="64dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/entries_recycler"
|
||||
@@ -69,48 +64,41 @@
|
||||
|
||||
<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" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/entries_select_all"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:backgroundTint="@color/surfaceCard"
|
||||
android:text="@string/entries_select_all"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/themeAccent"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
app:cornerRadius="@dimen/card_corner_high"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/entries_accept"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/entries_bottom_bar"
|
||||
style="@style/BottomAppBar">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/entries_accept"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
android:layout_width="0dp"
|
||||
<Button
|
||||
android:id="@+id/entries_select_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@color/themeAccent"
|
||||
android:text="@string/btn_accept"
|
||||
android:textColor="@color/surfaceBg"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
app:cornerRadius="@dimen/card_corner_high"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/entries_select_all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/entries_select_all" />
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:text="Select"
|
||||
app:icon="@drawable/ic_checkbox" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<Button
|
||||
android:id="@+id/entries_clear_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:text="Clear"
|
||||
app:icon="@drawable/ic_checkbox_out"
|
||||
app:iconGravity="end" />
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/entries_accept_btn"
|
||||
style="@style/FloatingActionButton"
|
||||
android:src="@drawable/ic_play"
|
||||
app:layout_anchor="@id/entries_bottom_bar" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -6,7 +6,7 @@
|
||||
android:keepScreenOn="true">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/map_toolbar"
|
||||
android:id="@+id/map_top_bar"
|
||||
style="@style/ToolbarCard"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
@@ -16,7 +16,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/map_back"
|
||||
android:id="@+id/map_back_btn"
|
||||
style="@style/ToolbarButton"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:src="@drawable/ic_back" />
|
||||
@@ -37,11 +37,11 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_btn_prev"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_card_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/map_toolbar">
|
||||
app:layout_constraintTop_toBottomOf="@+id/map_top_bar">
|
||||
|
||||
<org.osmdroid.views.MapView
|
||||
android:id="@+id/map_view"
|
||||
@@ -51,20 +51,22 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/map_data_name"
|
||||
style="@style/WorldMapText"
|
||||
android:id="@+id/map_copyright"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pat_osm_idName"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_card_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/map_btn_next"
|
||||
app:layout_constraintStart_toEndOf="@+id/map_btn_prev"
|
||||
app:layout_constraintTop_toBottomOf="@+id/map_card" />
|
||||
android:text="@string/map_copyright"
|
||||
android:textColor="@color/themeDisabled"
|
||||
android:textSize="@dimen/text_size_copyright"
|
||||
app:layout_constraintEnd_toEndOf="@+id/map_card"
|
||||
app:layout_constraintStart_toStartOf="@+id/map_card"
|
||||
app:layout_constraintTop_toTopOf="@+id/map_card" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/map_card_info"
|
||||
@@ -73,8 +75,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_copyright"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_coordinator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
@@ -147,47 +149,56 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/map_btn_prev"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:backgroundTint="@color/surfaceToolbar"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/ic_arrow"
|
||||
app:layout_constraintBottom_toTopOf="@+id/map_card_info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:tint="@color/themeLight" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/map_btn_next"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:backgroundTint="@color/surfaceToolbar"
|
||||
android:src="@drawable/ic_arrow"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/map_btn_prev"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/map_btn_prev"
|
||||
app:tint="@color/themeLight" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/map_copyright"
|
||||
android:layout_width="0dp"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/map_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/map_copyright"
|
||||
android:textColor="@color/themeLight"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/text_size_copyright"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/map_bottom_bar"
|
||||
style="@style/BottomAppBar" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/map_prev_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="Prev"
|
||||
app:icon="@drawable/ic_arrow_left"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/map_coordinator"
|
||||
app:layout_constraintStart_toStartOf="@+id/map_coordinator"
|
||||
app:layout_constraintTop_toTopOf="@+id/map_coordinator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/map_data_name"
|
||||
style="@style/WorldMapText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pat_osm_idName"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/map_prev_btn"
|
||||
app:layout_constraintEnd_toStartOf="@+id/map_next_btn"
|
||||
app:layout_constraintStart_toEndOf="@+id/map_prev_btn" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/map_next_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="Next"
|
||||
app:icon="@drawable/ic_arrow_right"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/map_prev_btn"
|
||||
app:layout_constraintEnd_toEndOf="@+id/map_coordinator" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/passes_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/passes_toolbar"
|
||||
android:id="@+id/passes_top_bar"
|
||||
style="@style/ToolbarCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/passes_filter"
|
||||
android:id="@+id/passes_refresh_btn"
|
||||
style="@style/ToolbarButton"
|
||||
android:rotation="45"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:src="@drawable/ic_filter" />
|
||||
android:src="@drawable/ic_refresh" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passes_timer"
|
||||
@@ -27,42 +27,37 @@
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/passes_settings"
|
||||
android:id="@+id/passes_map_btn"
|
||||
style="@style/ToolbarButton"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:src="@drawable/ic_prefs" />
|
||||
android:src="@drawable/ic_world" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/passes_list_card"
|
||||
style="@style/SurfaceCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="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/passes_toolbar">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/passes_swipe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="64dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="64dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/passes_list"
|
||||
android:id="@+id/passes_recycler"
|
||||
style="@style/AppRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
<ProgressBar
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/passes_progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passes_error"
|
||||
android:id="@+id/passes_error_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@@ -72,4 +67,35 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/passes_bottomBar"
|
||||
style="@style/BottomAppBar">
|
||||
|
||||
<Button
|
||||
android:id="@+id/passes_filter_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:text="Filter"
|
||||
app:icon="@drawable/ic_filter" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/passes_settings_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="136dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:text="Настройки"
|
||||
app:icon="@drawable/ic_prefs"
|
||||
app:iconGravity="end" />
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/passes_fab"
|
||||
style="@style/FloatingActionButton"
|
||||
android:src="@drawable/ic_sputnik"
|
||||
app:layout_anchor="@id/passes_bottomBar" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -37,7 +37,6 @@
|
||||
<TextView
|
||||
android:id="@+id/radar_name"
|
||||
android:layout_width="0dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
@@ -45,6 +44,7 @@
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/radar_toolbar" />
|
||||
@@ -115,7 +115,7 @@
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/radar_coordinator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/radar_recycler_msg">
|
||||
@@ -131,7 +131,6 @@
|
||||
<TextView
|
||||
android:id="@+id/radar_recycler_msg"
|
||||
android:layout_width="0dp"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
@@ -140,8 +139,66 @@
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/trans_no_data"
|
||||
android:textSize="@dimen/text_size_medium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/radar_card" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/radar_coordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/radar_bottom_bar"
|
||||
style="@style/BottomAppBar" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/radar_prev_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="Notify"
|
||||
app:icon="@drawable/ic_notify_2"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/radar_coordinator"
|
||||
app:layout_constraintEnd_toStartOf="@+id/radar_data_name"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/radar_coordinator"
|
||||
app:layout_constraintStart_toStartOf="@+id/radar_coordinator"
|
||||
app:layout_constraintTop_toTopOf="@+id/radar_coordinator" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/radar_data_name"
|
||||
style="@style/WorldMapText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="1"
|
||||
android:text="@string/pat_osm_idName"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/radar_prev_btn"
|
||||
app:layout_constraintEnd_toStartOf="@+id/radar_next_btn"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/radar_prev_btn" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/radar_next_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="Settings"
|
||||
app:icon="@drawable/ic_prefs"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/radar_prev_btn"
|
||||
app:layout_constraintEnd_toEndOf="@+id/radar_coordinator"
|
||||
app:layout_constraintStart_toEndOf="@+id/radar_data_name" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@@ -7,12 +7,12 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/prefs_toolbar"
|
||||
style="@style/ToolbarCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/prefs_back"
|
||||
@@ -28,18 +28,21 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<ScrollView
|
||||
style="@style/AppRecycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
<androidx.cardview.widget.CardView
|
||||
style="@style/ToolbarCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="64dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="64dp"
|
||||
android:layout_marginEnd="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/prefs_toolbar">
|
||||
android:backgroundTint="@color/surfaceBg">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/settings_scroll"
|
||||
style="@style/AppRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -107,6 +110,41 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/settings_bottom_bar"
|
||||
style="@style/BottomAppBar">
|
||||
|
||||
<Button
|
||||
android:id="@+id/settings_prev_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="Notify"
|
||||
app:icon="@drawable/ic_notify_2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/settings_next_btn"
|
||||
style="@style/AppButton"
|
||||
android:layout_width="128dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="Settings"
|
||||
app:icon="@drawable/ic_prefs" />
|
||||
|
||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/settings_fab"
|
||||
style="@style/FloatingActionButton"
|
||||
android:src="@drawable/ic_sputnik"
|
||||
app:layout_anchor="@id/settings_bottom_bar" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -6,12 +6,12 @@
|
||||
<CheckBox
|
||||
android:id="@+id/entry_checkbox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_margin="4dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@color/surfaceCard"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:padding="1dp"
|
||||
android:padding="4dp"
|
||||
android:textColor="@color/themeLight"
|
||||
android:textSize="@dimen/text_size_medium" />
|
||||
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
<?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/trans_card"
|
||||
style="@style/RecyclerItemCard">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/trans_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/trans_guideline"
|
||||
android:id="@+id/radio_guide"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trans_desc"
|
||||
android:id="@+id/radio_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
@@ -28,57 +26,57 @@
|
||||
android:maxLines="1"
|
||||
android:text="@string/trans_description"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/trans_uplink_img"
|
||||
app:layout_constraintEnd_toStartOf="@+id/radio_up_img"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toEndOf="@+id/trans_downlink_img"
|
||||
app:layout_constraintStart_toEndOf="@+id/radio_down_img"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/trans_downlink_img"
|
||||
android:id="@+id/radio_down_img"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:rotation="90"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/trans_desc"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/radio_info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/trans_desc"
|
||||
app:srcCompat="@drawable/ic_arrow" />
|
||||
app:layout_constraintTop_toTopOf="@+id/radio_info"
|
||||
app:srcCompat="@drawable/ic_arrow_right" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trans_downlink"
|
||||
android:id="@+id/radio_downlink"
|
||||
style="@style/ToolbarTimer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/trans_link_low"
|
||||
android:textSize="@dimen/text_size_frequency"
|
||||
app:layout_constraintEnd_toStartOf="@+id/trans_guideline"
|
||||
app:layout_constraintEnd_toStartOf="@+id/radio_guide"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/trans_desc" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/radio_info" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/trans_uplink_img"
|
||||
android:id="@+id/radio_up_img"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:rotation="270"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/trans_desc"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/radio_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/trans_desc"
|
||||
app:srcCompat="@drawable/ic_arrow" />
|
||||
app:layout_constraintTop_toTopOf="@+id/radio_info"
|
||||
app:srcCompat="@drawable/ic_arrow_right" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trans_uplink"
|
||||
android:id="@+id/radio_uplink"
|
||||
style="@style/ToolbarTimer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/trans_link_low"
|
||||
android:textSize="@dimen/text_size_frequency"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/trans_downlink"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/radio_downlink"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/trans_guideline" />
|
||||
app:layout_constraintStart_toStartOf="@+id/radio_guide" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trans_mode"
|
||||
android:id="@+id/radio_mode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
@@ -86,21 +84,21 @@
|
||||
android:text="@string/trans_mode"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/trans_inverted"
|
||||
app:layout_constraintEnd_toStartOf="@+id/radio_inverted"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/trans_downlink" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/radio_downlink" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trans_inverted"
|
||||
android:id="@+id/radio_inverted"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/trans_inverted"
|
||||
android:textSize="@dimen/text_size_small"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/trans_mode"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/radio_mode"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/trans_mode" />
|
||||
app:layout_constraintStart_toEndOf="@+id/radio_mode" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<color name="surfaceChip">#303030</color>
|
||||
<color name="surfaceButton">#242424</color>
|
||||
<color name="surfaceToolbar">#1A1A1A</color>
|
||||
<color name="bottomAppBar">#1A1A1A</color>
|
||||
<color name="surfaceSystem">#1A1A1A</color>
|
||||
<color name="surfaceCard">#1A1A1A</color>
|
||||
<color name="surfaceBg">#121212</color>
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- View values-->
|
||||
<dimen name="btn_corner_low">0dp</dimen>
|
||||
<dimen name="btn_corner_high">8dp</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">12dp</dimen>
|
||||
<dimen name="view_default_margin">8dp</dimen>
|
||||
<!-- Text values-->
|
||||
<dimen name="text_size_copyright">13sp</dimen>
|
||||
<dimen name="text_size_small">15sp</dimen>
|
||||
<dimen name="text_size_medium">16sp</dimen>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<item name="colorSecondary">@color/themeAccent</item>
|
||||
<!-- Bottom bar colors-->
|
||||
<item name="colorOnSecondaryContainer">@color/themeLight</item>
|
||||
<item name="colorOnPrimaryContainer">@color/surfaceBg</item>
|
||||
<item name="colorOnSurfaceVariant">@color/themeLight</item>
|
||||
<item name="colorSecondaryContainer">@color/surfaceIcon</item>
|
||||
<!-- -->
|
||||
@@ -41,6 +42,23 @@
|
||||
<item name="android:scrollbars">none</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomAppBar">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">56dp</item>
|
||||
<item name="android:layout_gravity">bottom</item>
|
||||
<item name="android:backgroundTint">@color/bottomAppBar</item>
|
||||
<item name="contentInsetStart">4dp</item>
|
||||
<item name="contentInsetEnd">4dp</item>
|
||||
<item name="fabCradleMargin">8dp</item>
|
||||
<item name="fabCradleRoundedCornerRadius">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="FloatingActionButton">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:backgroundTint">@color/themeAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="RecyclerItemCard">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
||||
@@ -110,8 +110,8 @@ class DataRepository(
|
||||
|
||||
override suspend fun getDataSources() = localSource.getDataSources()
|
||||
|
||||
override fun setEntriesSelection(catnums: List<Int>) {
|
||||
repositoryScope.launch { localSource.setEntriesSelection(catnums) }
|
||||
override suspend fun setEntriesSelection(catnums: List<Int>) {
|
||||
localSource.setEntriesSelection(catnums)
|
||||
}
|
||||
|
||||
private suspend fun importSatellites(stream: InputStream): List<SatEntry> {
|
||||
|
||||
@@ -43,5 +43,5 @@ interface IDataRepository {
|
||||
|
||||
suspend fun getDataSources(): List<String>
|
||||
|
||||
fun setEntriesSelection(catnums: List<Int>)
|
||||
suspend fun setEntriesSelection(catnums: List<Int>)
|
||||
}
|
||||
Reference in new issue
Block a user