mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Further refactoring and code cleanup
This commit is contained in:
1 parent
b87f2a6e72
commit
4b050e21f0
72 files changed
+546
-988
No files matched your search
@@ -34,8 +34,7 @@
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".ui.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.Splash">
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ package com.rtbishop.look4sat.dagger
|
||||
import android.content.Context
|
||||
import com.rtbishop.look4sat.dagger.modules.*
|
||||
import com.rtbishop.look4sat.ui.MainActivity
|
||||
import com.rtbishop.look4sat.ui.fragments.MapOsmFragment
|
||||
import com.rtbishop.look4sat.ui.fragments.PassListFragment
|
||||
import com.rtbishop.look4sat.ui.fragments.PolarViewFragment
|
||||
import com.rtbishop.look4sat.ui.fragments.MapFragment
|
||||
import com.rtbishop.look4sat.ui.fragments.PassesFragment
|
||||
import com.rtbishop.look4sat.ui.fragments.PolarFragment
|
||||
import dagger.BindsInstance
|
||||
import dagger.Component
|
||||
import javax.inject.Singleton
|
||||
@@ -42,7 +42,7 @@ interface AppComponent {
|
||||
}
|
||||
|
||||
fun inject(mainActivity: MainActivity)
|
||||
fun inject(passListFragment: PassListFragment)
|
||||
fun inject(polarViewFragment: PolarViewFragment)
|
||||
fun inject(mapOsmFragment: MapOsmFragment)
|
||||
fun inject(passesFragment: PassesFragment)
|
||||
fun inject(polarFragment: PolarFragment)
|
||||
fun inject(mapFragment: MapFragment)
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.rtbishop.look4sat.dagger.modules
|
||||
|
||||
import com.rtbishop.look4sat.repo.api.TransmittersApi
|
||||
import com.rtbishop.look4sat.repo.remote.TransApi
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import okhttp3.OkHttpClient
|
||||
@@ -32,17 +32,17 @@ class NetworkModule {
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideOkHttpClient(): OkHttpClient {
|
||||
fun provideWebClient(): OkHttpClient {
|
||||
return OkHttpClient()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideTransmittersApi(): TransmittersApi {
|
||||
fun provideTransApi(): TransApi {
|
||||
return Retrofit.Builder()
|
||||
.baseUrl("https://db.satnogs.org/api/")
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build()
|
||||
.create(TransmittersApi::class.java)
|
||||
.create(TransApi::class.java)
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,10 @@ package com.rtbishop.look4sat.dagger.modules
|
||||
|
||||
import android.content.Context
|
||||
import androidx.room.Room
|
||||
import com.rtbishop.look4sat.repo.SatelliteDb
|
||||
import com.rtbishop.look4sat.repo.dao.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.dao.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.dao.TransmittersDao
|
||||
import com.rtbishop.look4sat.repo.local.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.local.SatDb
|
||||
import com.rtbishop.look4sat.repo.local.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.local.TransDao
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import javax.inject.Singleton
|
||||
@@ -34,26 +34,26 @@ class PersistenceModule {
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideEntriesDao(db: SatelliteDb): EntriesDao {
|
||||
fun provideEntriesDao(db: SatDb): EntriesDao {
|
||||
return db.entriesDao()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideTransmittersDao(db: SatelliteDb): TransmittersDao {
|
||||
return db.transmittersDao()
|
||||
fun provideTransDao(db: SatDb): TransDao {
|
||||
return db.transDao()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun providesSourcesDao(db: SatelliteDb): SourcesDao {
|
||||
fun providesSourcesDao(db: SatDb): SourcesDao {
|
||||
return db.sourcesDao()
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideSatelliteDb(context: Context): SatelliteDb {
|
||||
return Room.databaseBuilder(context, SatelliteDb::class.java, "satDb")
|
||||
fun provideSatDb(context: Context): SatDb {
|
||||
return Room.databaseBuilder(context, SatDb::class.java, "satDb")
|
||||
.build()
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,10 @@ import android.content.ContentResolver
|
||||
import android.content.Context
|
||||
import com.rtbishop.look4sat.repo.DefaultRepository
|
||||
import com.rtbishop.look4sat.repo.Repository
|
||||
import com.rtbishop.look4sat.repo.api.TransmittersApi
|
||||
import com.rtbishop.look4sat.repo.dao.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.dao.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.dao.TransmittersDao
|
||||
import com.rtbishop.look4sat.repo.local.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.local.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.local.TransDao
|
||||
import com.rtbishop.look4sat.repo.remote.TransApi
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import okhttp3.OkHttpClient
|
||||
@@ -26,19 +26,19 @@ class RepoModule {
|
||||
@Provides
|
||||
fun provideDefaultRepository(
|
||||
resolver: ContentResolver,
|
||||
transmittersApi: TransmittersApi,
|
||||
client: OkHttpClient,
|
||||
transApi: TransApi,
|
||||
entriesDao: EntriesDao,
|
||||
transmittersDao: TransmittersDao,
|
||||
transDao: TransDao,
|
||||
sourcesDao: SourcesDao
|
||||
): Repository {
|
||||
return DefaultRepository(
|
||||
resolver,
|
||||
client,
|
||||
transmittersApi,
|
||||
transApi,
|
||||
entriesDao,
|
||||
sourcesDao,
|
||||
transmittersDao
|
||||
transDao
|
||||
)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@ import androidx.room.PrimaryKey
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
@Entity(tableName = "transmitters")
|
||||
data class Transmitter(
|
||||
data class SatTrans(
|
||||
@PrimaryKey @SerializedName("uuid") val uuid: String,
|
||||
@SerializedName("description") val description: String,
|
||||
@SerializedName("alive") val isAlive: Boolean,
|
||||
@@ -23,12 +23,12 @@ import android.content.ContentResolver
|
||||
import android.net.Uri
|
||||
import com.github.amsacode.predict4java.TLE
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
import com.rtbishop.look4sat.data.TleSource
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import com.rtbishop.look4sat.repo.api.TransmittersApi
|
||||
import com.rtbishop.look4sat.repo.dao.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.dao.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.dao.TransmittersDao
|
||||
import com.rtbishop.look4sat.repo.local.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.local.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.local.TransDao
|
||||
import com.rtbishop.look4sat.repo.remote.TransApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import okhttp3.OkHttpClient
|
||||
@@ -39,10 +39,10 @@ import javax.inject.Inject
|
||||
class DefaultRepository @Inject constructor(
|
||||
private val resolver: ContentResolver,
|
||||
private val client: OkHttpClient,
|
||||
private val api: TransmittersApi,
|
||||
private val api: TransApi,
|
||||
private val entriesDao: EntriesDao,
|
||||
private val sourcesDao: SourcesDao,
|
||||
private val transmittersDao: TransmittersDao
|
||||
private val transDao: TransDao
|
||||
) : Repository {
|
||||
|
||||
override suspend fun updateEntriesFromFile(tleUri: Uri) {
|
||||
@@ -82,8 +82,8 @@ class DefaultRepository @Inject constructor(
|
||||
return@withContext streams
|
||||
}
|
||||
|
||||
override suspend fun fetchTransmitters(): List<Transmitter> {
|
||||
return api.fetchTransmitters()
|
||||
override suspend fun fetchTransmitters(): List<SatTrans> {
|
||||
return api.fetchTransList()
|
||||
}
|
||||
|
||||
override suspend fun insertEntries(entries: List<SatEntry>) {
|
||||
@@ -112,12 +112,12 @@ class DefaultRepository @Inject constructor(
|
||||
override suspend fun updateTransmitters() {
|
||||
}
|
||||
|
||||
override suspend fun getTransmittersByCatNum(catNum: Int): List<Transmitter> {
|
||||
return transmittersDao.getTransmittersByCatNum(catNum)
|
||||
override suspend fun getTransmittersByCatNum(catNum: Int): List<SatTrans> {
|
||||
return transDao.getTransmittersForCatNum(catNum)
|
||||
}
|
||||
|
||||
override suspend fun clearTransmitters() {
|
||||
transmittersDao.clearTransmitters()
|
||||
transDao.clearTransmitters()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.rtbishop.look4sat.repo
|
||||
|
||||
import android.net.Uri
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
import com.rtbishop.look4sat.data.TleSource
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import java.io.InputStream
|
||||
|
||||
interface Repository {
|
||||
@@ -16,7 +16,7 @@ interface Repository {
|
||||
|
||||
suspend fun fetchTleStreams(urlList: List<TleSource>): List<InputStream>
|
||||
|
||||
suspend fun fetchTransmitters(): List<Transmitter>
|
||||
suspend fun fetchTransmitters(): List<SatTrans>
|
||||
|
||||
suspend fun insertEntries(entries: List<SatEntry>)
|
||||
|
||||
@@ -32,7 +32,7 @@ interface Repository {
|
||||
|
||||
suspend fun updateTransmitters()
|
||||
|
||||
suspend fun getTransmittersByCatNum(catNum: Int): List<Transmitter>
|
||||
suspend fun getTransmittersByCatNum(catNum: Int): List<SatTrans>
|
||||
|
||||
suspend fun clearTransmitters()
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
package com.rtbishop.look4sat.repo.dao
|
||||
package com.rtbishop.look4sat.repo.local
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
+5
-8
@@ -17,30 +17,27 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
package com.rtbishop.look4sat.repo
|
||||
package com.rtbishop.look4sat.repo.local
|
||||
|
||||
import androidx.room.Database
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverters
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
import com.rtbishop.look4sat.data.TleSource
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import com.rtbishop.look4sat.repo.dao.EntriesDao
|
||||
import com.rtbishop.look4sat.repo.dao.SourcesDao
|
||||
import com.rtbishop.look4sat.repo.dao.TransmittersDao
|
||||
import com.rtbishop.look4sat.utility.Converters
|
||||
|
||||
@Database(
|
||||
entities = [Transmitter::class, SatEntry::class, TleSource::class],
|
||||
entities = [SatTrans::class, SatEntry::class, TleSource::class],
|
||||
version = 1,
|
||||
exportSchema = false
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
abstract class SatelliteDb : RoomDatabase() {
|
||||
abstract class SatDb : RoomDatabase() {
|
||||
|
||||
abstract fun entriesDao(): EntriesDao
|
||||
|
||||
abstract fun transmittersDao(): TransmittersDao
|
||||
abstract fun transDao(): TransDao
|
||||
|
||||
abstract fun sourcesDao(): SourcesDao
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.rtbishop.look4sat.repo.dao
|
||||
package com.rtbishop.look4sat.repo.local
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
package com.rtbishop.look4sat.repo.dao
|
||||
package com.rtbishop.look4sat.repo.local
|
||||
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
|
||||
@Dao
|
||||
interface TransmittersDao {
|
||||
interface TransDao {
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertTransmitters(transmitters: List<Transmitter>)
|
||||
suspend fun insertTransmitters(satTrans: List<SatTrans>)
|
||||
|
||||
@Query("SELECT * FROM transmitters WHERE isAlive = 1 and catNum = :catNum")
|
||||
suspend fun getTransmittersByCatNum(catNum: Int): List<Transmitter>
|
||||
suspend fun getTransmittersForCatNum(catNum: Int): List<SatTrans>
|
||||
|
||||
@Query("DELETE FROM transmitters")
|
||||
suspend fun clearTransmitters()
|
||||
+4
-4
@@ -17,13 +17,13 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
package com.rtbishop.look4sat.repo.api
|
||||
package com.rtbishop.look4sat.repo.remote
|
||||
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
import retrofit2.http.GET
|
||||
|
||||
interface TransmittersApi {
|
||||
interface TransApi {
|
||||
|
||||
@GET("transmitters/")
|
||||
suspend fun fetchTransmitters(): List<Transmitter>
|
||||
suspend fun fetchTransList(): List<SatTrans>
|
||||
}
|
||||
@@ -19,7 +19,6 @@ class MainActivity : AppCompatActivity() {
|
||||
// )
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setTheme(R.style.AppTheme)
|
||||
super.onCreate(savedInstanceState)
|
||||
val binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
@@ -48,7 +47,7 @@ class MainActivity : AppCompatActivity() {
|
||||
// }
|
||||
|
||||
// private fun openSourcesDialog() {
|
||||
// TleSourcesDialogFragment(viewModel.getTleSources()).apply {
|
||||
// SourcesDialog(viewModel.getTleSources()).apply {
|
||||
// setSourcesListener(this@MainActivity)
|
||||
// show(supportFragmentManager, "TleSourcesDialog")
|
||||
// }
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.databinding.ItemSatEntryBinding
|
||||
|
||||
class SatEntryAdapter(private var entries: MutableList<SatEntry>) :
|
||||
RecyclerView.Adapter<SatEntryAdapter.SatEntryHolder>() {
|
||||
class EntriesAdapter(private var entries: MutableList<SatEntry>) :
|
||||
RecyclerView.Adapter<EntriesAdapter.SatEntryHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SatEntryHolder {
|
||||
val binding = ItemSatEntryBinding
|
||||
+4
-4
@@ -29,12 +29,12 @@ import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.data.SatPass
|
||||
import com.rtbishop.look4sat.databinding.ItemPassGeoBinding
|
||||
import com.rtbishop.look4sat.databinding.ItemPassLeoBinding
|
||||
import com.rtbishop.look4sat.ui.fragments.PassListFragmentDirections
|
||||
import com.rtbishop.look4sat.ui.fragments.PassesFragmentDirections
|
||||
import com.rtbishop.look4sat.utility.PrefsManager
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class SatPassAdapter(
|
||||
class PassesAdapter(
|
||||
private var satPassList: MutableList<SatPass>,
|
||||
private val prefsManager: PrefsManager
|
||||
) :
|
||||
@@ -125,7 +125,7 @@ class SatPassAdapter(
|
||||
|
||||
itemView.setOnClickListener {
|
||||
val passIndex = satPassList.indexOf(satPass)
|
||||
val action = PassListFragmentDirections.actionPassToPolar(passIndex)
|
||||
val action = PassesFragmentDirections.actionPassToPolar(passIndex)
|
||||
itemView.findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ class SatPassAdapter(
|
||||
|
||||
itemView.setOnClickListener {
|
||||
val passIndex = satPassList.indexOf(satPass)
|
||||
val action = PassListFragmentDirections.actionPassToPolar(passIndex)
|
||||
val action = PassesFragmentDirections.actionPassToPolar(passIndex)
|
||||
itemView.findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -28,8 +28,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.rtbishop.look4sat.data.TleSource
|
||||
import com.rtbishop.look4sat.databinding.ItemTleSourceBinding
|
||||
|
||||
class TleSourcesAdapter(private var sources: MutableList<TleSource>) :
|
||||
RecyclerView.Adapter<TleSourcesAdapter.TleSourceHolder>() {
|
||||
class SourcesAdapter(private var sources: MutableList<TleSource>) :
|
||||
RecyclerView.Adapter<SourcesAdapter.TleSourceHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TleSourceHolder {
|
||||
val binding = ItemTleSourceBinding
|
||||
+31
-31
@@ -25,21 +25,21 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.data.Transmitter
|
||||
import com.rtbishop.look4sat.databinding.ItemTransmitterBinding
|
||||
import com.rtbishop.look4sat.data.SatTrans
|
||||
import com.rtbishop.look4sat.databinding.ItemTransBinding
|
||||
import com.rtbishop.look4sat.utility.PassPredictor
|
||||
import java.util.*
|
||||
|
||||
class TransmitterAdapter : RecyclerView.Adapter<TransmitterAdapter.TransmitterHolder>() {
|
||||
class TransAdapter : RecyclerView.Adapter<TransAdapter.TransHolder>() {
|
||||
|
||||
private var transmittersList = emptyList<Transmitter>()
|
||||
private var transmittersList = emptyList<SatTrans>()
|
||||
private lateinit var predictor: PassPredictor
|
||||
|
||||
fun setPredictor(predict: PassPredictor) {
|
||||
predictor = predict
|
||||
}
|
||||
|
||||
fun setList(list: List<Transmitter>) {
|
||||
fun setList(list: List<SatTrans>) {
|
||||
transmittersList = list
|
||||
}
|
||||
|
||||
@@ -47,86 +47,86 @@ class TransmitterAdapter : RecyclerView.Adapter<TransmitterAdapter.TransmitterHo
|
||||
return transmittersList.size
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TransmitterHolder {
|
||||
val binding = ItemTransmitterBinding
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TransHolder {
|
||||
val binding = ItemTransBinding
|
||||
.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
return TransmitterHolder(binding.root, binding)
|
||||
return TransHolder(binding.root, binding)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TransmitterHolder, position: Int) {
|
||||
override fun onBindViewHolder(holder: TransHolder, position: Int) {
|
||||
holder.bind(transmittersList[position])
|
||||
}
|
||||
|
||||
inner class TransmitterHolder(itemView: View, private val binding: ItemTransmitterBinding) :
|
||||
inner class TransHolder(itemView: View, private val binding: ItemTransBinding) :
|
||||
RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
fun bind(transmitter: Transmitter) {
|
||||
fun bind(satTrans: SatTrans) {
|
||||
val context: Context = itemView.context
|
||||
val freqDivider = 1000000f
|
||||
|
||||
binding.transDescription.text = transmitter.description
|
||||
binding.transDescription.text = satTrans.description
|
||||
|
||||
if (transmitter.downlinkLow != null && transmitter.downlinkHigh == null) {
|
||||
if (satTrans.downlinkLow != null && satTrans.downlinkHigh == null) {
|
||||
binding.transDownlink.text = String
|
||||
.format(
|
||||
context.getString(R.string.trans_down_low),
|
||||
transmitter.downlinkLow / freqDivider
|
||||
satTrans.downlinkLow / freqDivider
|
||||
)
|
||||
binding.transDownlinkDoppler.text = String
|
||||
.format(
|
||||
context.getString(R.string.trans_down_low_doppler),
|
||||
predictor.getDownlinkFreq(transmitter.downlinkLow, Date()) / freqDivider
|
||||
predictor.getDownlinkFreq(satTrans.downlinkLow, Date()) / freqDivider
|
||||
)
|
||||
} else if (transmitter.downlinkLow != null && transmitter.downlinkHigh != null) {
|
||||
} else if (satTrans.downlinkLow != null && satTrans.downlinkHigh != null) {
|
||||
binding.transDownlink.text = String
|
||||
.format(
|
||||
context.getString(R.string.trans_down_lowHigh),
|
||||
transmitter.downlinkLow / freqDivider,
|
||||
transmitter.downlinkHigh / freqDivider
|
||||
satTrans.downlinkLow / freqDivider,
|
||||
satTrans.downlinkHigh / freqDivider
|
||||
)
|
||||
binding.transDownlinkDoppler.text = String
|
||||
.format(
|
||||
context.getString(R.string.trans_down_lowHigh_doppler),
|
||||
predictor.getDownlinkFreq(transmitter.downlinkLow, Date()) / freqDivider,
|
||||
predictor.getDownlinkFreq(transmitter.downlinkHigh, Date()) / freqDivider
|
||||
predictor.getDownlinkFreq(satTrans.downlinkLow, Date()) / freqDivider,
|
||||
predictor.getDownlinkFreq(satTrans.downlinkHigh, Date()) / freqDivider
|
||||
)
|
||||
} else {
|
||||
binding.transDownlink.text = context.getString(R.string.no_downlink)
|
||||
binding.transDownlinkDoppler.text = context.getString(R.string.no_downlink_doppler)
|
||||
}
|
||||
|
||||
if (transmitter.uplinkLow != null && transmitter.uplinkHigh == null) {
|
||||
if (satTrans.uplinkLow != null && satTrans.uplinkHigh == null) {
|
||||
binding.transUplink.text = String.format(
|
||||
context.getString(R.string.trans_up_low),
|
||||
transmitter.uplinkLow / freqDivider
|
||||
satTrans.uplinkLow / freqDivider
|
||||
)
|
||||
binding.transUplinkDoppler.text = String.format(
|
||||
context.getString(R.string.trans_up_low_doppler),
|
||||
predictor.getUplinkFreq(transmitter.uplinkLow, Date()) / freqDivider
|
||||
predictor.getUplinkFreq(satTrans.uplinkLow, Date()) / freqDivider
|
||||
)
|
||||
} else if (transmitter.uplinkLow != null && transmitter.uplinkHigh != null) {
|
||||
} else if (satTrans.uplinkLow != null && satTrans.uplinkHigh != null) {
|
||||
binding.transUplink.text = String.format(
|
||||
context.getString(R.string.trans_up_lowHigh),
|
||||
transmitter.uplinkLow / freqDivider,
|
||||
transmitter.uplinkHigh / freqDivider
|
||||
satTrans.uplinkLow / freqDivider,
|
||||
satTrans.uplinkHigh / freqDivider
|
||||
)
|
||||
binding.transUplinkDoppler.text = String.format(
|
||||
context.getString(R.string.trans_up_lowHigh_doppler),
|
||||
predictor.getUplinkFreq(transmitter.uplinkLow, Date()) / freqDivider,
|
||||
predictor.getUplinkFreq(transmitter.uplinkHigh, Date()) / freqDivider
|
||||
predictor.getUplinkFreq(satTrans.uplinkLow, Date()) / freqDivider,
|
||||
predictor.getUplinkFreq(satTrans.uplinkHigh, Date()) / freqDivider
|
||||
)
|
||||
} else {
|
||||
binding.transUplink.text = context.getString(R.string.no_uplink)
|
||||
binding.transUplinkDoppler.text = context.getString(R.string.no_uplink_doppler)
|
||||
}
|
||||
|
||||
if (transmitter.mode != null) {
|
||||
if (satTrans.mode != null) {
|
||||
binding.transMode.text =
|
||||
String.format(context.getString(R.string.trans_mode), transmitter.mode)
|
||||
String.format(context.getString(R.string.trans_mode), satTrans.mode)
|
||||
} else {
|
||||
binding.transMode.text = context.getString(R.string.no_mode)
|
||||
}
|
||||
if (transmitter.isInverted) {
|
||||
if (satTrans.isInverted) {
|
||||
binding.transInverted.text = String.format(
|
||||
context.getString(R.string.trans_inverted),
|
||||
context.getString(R.string.btn_yes)
|
||||
@@ -31,9 +31,9 @@ class AboutFragment : Fragment(R.layout.fragment_about) {
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val binding = FragmentAboutBinding.bind(view)
|
||||
binding.tvAboutVersion.text =
|
||||
String.format(getString(R.string.app_version), BuildConfig.VERSION_NAME)
|
||||
binding.tvAboutMessage.movementMethod = LinkMovementMethod.getInstance()
|
||||
FragmentAboutBinding.bind(view).apply {
|
||||
version.text = String.format(getString(R.string.app_version), BuildConfig.VERSION_NAME)
|
||||
message.movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -27,19 +27,19 @@ import android.widget.SearchView
|
||||
import androidx.appcompat.app.AppCompatDialogFragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.databinding.DialogSatEntryBinding
|
||||
import com.rtbishop.look4sat.ui.adapters.SatEntryAdapter
|
||||
import com.rtbishop.look4sat.databinding.DialogEntriesBinding
|
||||
import com.rtbishop.look4sat.ui.adapters.EntriesAdapter
|
||||
import java.util.*
|
||||
|
||||
class SatEntryDialogFragment(private var entries: MutableList<SatEntry>) :
|
||||
class EntriesDialog(private var entries: MutableList<SatEntry>) :
|
||||
AppCompatDialogFragment(), SearchView.OnQueryTextListener {
|
||||
|
||||
private lateinit var entriesListener: EntriesSubmitListener
|
||||
private val entryAdapter = SatEntryAdapter(entries)
|
||||
private val entryAdapter = EntriesAdapter(entries)
|
||||
private var selectAllToggle = true
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val binding = DialogSatEntryBinding.inflate(requireActivity().layoutInflater)
|
||||
val binding = DialogEntriesBinding.inflate(requireActivity().layoutInflater)
|
||||
val satEntryDialog = Dialog(requireActivity()).apply {
|
||||
window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
setContentView(binding.root)
|
||||
@@ -50,7 +50,7 @@ class SatEntryDialogFragment(private var entries: MutableList<SatEntry>) :
|
||||
}
|
||||
|
||||
binding.dialogSearch.apply {
|
||||
setOnQueryTextListener(this@SatEntryDialogFragment)
|
||||
setOnQueryTextListener(this@EntriesDialog)
|
||||
onActionViewExpanded()
|
||||
clearFocus()
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class SatEntryDialogFragment(private var entries: MutableList<SatEntry>) :
|
||||
return satEntryDialog
|
||||
}
|
||||
|
||||
fun setEntriesListener(listener: EntriesSubmitListener): SatEntryDialogFragment {
|
||||
fun setEntriesListener(listener: EntriesSubmitListener): EntriesDialog {
|
||||
entriesListener = listener
|
||||
return this
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.rtbishop.look4sat.ui.fragments
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.databinding.FragmentEntriesBinding
|
||||
|
||||
class EntriesFragment : Fragment(R.layout.fragment_entries) {
|
||||
|
||||
private lateinit var binding: FragmentEntriesBinding
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
binding = FragmentEntriesBinding.bind(view)
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -20,7 +20,7 @@ import com.rtbishop.look4sat.dagger.ViewModelFactory
|
||||
import com.rtbishop.look4sat.data.Result
|
||||
import com.rtbishop.look4sat.data.SatItem
|
||||
import com.rtbishop.look4sat.data.SatPass
|
||||
import com.rtbishop.look4sat.databinding.FragmentMapOsmBinding
|
||||
import com.rtbishop.look4sat.databinding.FragmentMapBinding
|
||||
import com.rtbishop.look4sat.ui.SharedViewModel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -39,13 +39,13 @@ import javax.inject.Inject
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.sqrt
|
||||
|
||||
class MapOsmFragment : Fragment(R.layout.fragment_map_osm) {
|
||||
class MapFragment : Fragment(R.layout.fragment_map) {
|
||||
|
||||
@Inject
|
||||
lateinit var modelFactory: ViewModelFactory
|
||||
private lateinit var mainActivity: FragmentActivity
|
||||
private lateinit var viewModel: SharedViewModel
|
||||
private lateinit var binding: FragmentMapOsmBinding
|
||||
private lateinit var binding: FragmentMapBinding
|
||||
private lateinit var trackPaint: Paint
|
||||
private lateinit var footprintPaint: Paint
|
||||
private lateinit var selectedPass: SatPass
|
||||
@@ -53,7 +53,7 @@ class MapOsmFragment : Fragment(R.layout.fragment_map_osm) {
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
binding = FragmentMapOsmBinding.bind(view)
|
||||
binding = FragmentMapBinding.bind(view)
|
||||
mainActivity = requireActivity()
|
||||
(mainActivity.application as Look4SatApp).appComponent.inject(this)
|
||||
viewModel = ViewModelProvider(mainActivity, modelFactory).get(SharedViewModel::class.java)
|
||||
+23
-35
@@ -36,9 +36,9 @@ import com.rtbishop.look4sat.dagger.ViewModelFactory
|
||||
import com.rtbishop.look4sat.data.Result
|
||||
import com.rtbishop.look4sat.data.SatEntry
|
||||
import com.rtbishop.look4sat.data.SatPass
|
||||
import com.rtbishop.look4sat.databinding.FragmentPassListBinding
|
||||
import com.rtbishop.look4sat.databinding.FragmentPassesBinding
|
||||
import com.rtbishop.look4sat.ui.SharedViewModel
|
||||
import com.rtbishop.look4sat.ui.adapters.SatPassAdapter
|
||||
import com.rtbishop.look4sat.ui.adapters.PassesAdapter
|
||||
import com.rtbishop.look4sat.utility.Extensions.snack
|
||||
import com.rtbishop.look4sat.utility.PrefsManager
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -46,7 +46,7 @@ import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
class PassesFragment : Fragment(R.layout.fragment_passes) {
|
||||
|
||||
@Inject
|
||||
lateinit var modelFactory: ViewModelFactory
|
||||
@@ -55,10 +55,10 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
lateinit var prefsManager: PrefsManager
|
||||
|
||||
private lateinit var viewModel: SharedViewModel
|
||||
private lateinit var satPassAdapter: SatPassAdapter
|
||||
private lateinit var passesAdapter: PassesAdapter
|
||||
private lateinit var aosTimer: CountDownTimer
|
||||
private lateinit var mainActivity: FragmentActivity
|
||||
private lateinit var binding: FragmentPassListBinding
|
||||
private lateinit var binding: FragmentPassesBinding
|
||||
private var isTimerSet: Boolean = false
|
||||
private var satPassList: MutableList<SatPass> = mutableListOf()
|
||||
|
||||
@@ -66,10 +66,10 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
mainActivity = requireActivity()
|
||||
binding = FragmentPassListBinding.bind(view)
|
||||
binding = FragmentPassesBinding.bind(view)
|
||||
(mainActivity.application as Look4SatApp).appComponent.inject(this)
|
||||
viewModel = ViewModelProvider(mainActivity, modelFactory).get(SharedViewModel::class.java)
|
||||
satPassAdapter = SatPassAdapter(satPassList, prefsManager)
|
||||
passesAdapter = PassesAdapter(satPassList, prefsManager)
|
||||
|
||||
setupObservers()
|
||||
setupComponents()
|
||||
@@ -77,7 +77,7 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
if (satPassAdapter.itemCount == 0) {
|
||||
if (passesAdapter.itemCount == 0) {
|
||||
viewModel.calculatePasses()
|
||||
}
|
||||
}
|
||||
@@ -87,41 +87,29 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
when (result) {
|
||||
is Result.Success -> {
|
||||
satPassList = result.data
|
||||
satPassAdapter.setList(satPassList)
|
||||
if (satPassList.isNotEmpty()) {
|
||||
binding.layoutInfo.visibility = View.INVISIBLE
|
||||
binding.recPassList.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.layoutInfo.visibility = View.VISIBLE
|
||||
binding.recPassList.visibility = View.INVISIBLE
|
||||
}
|
||||
passesAdapter.setList(satPassList)
|
||||
setTimer()
|
||||
// binding.refLayoutPassList.isRefreshing = false
|
||||
}
|
||||
is Result.InProgress -> {
|
||||
// binding.refLayoutPassList.isRefreshing = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun setupComponents() {
|
||||
binding.recPassList.apply {
|
||||
binding.passesRecycler.apply {
|
||||
layoutManager = LinearLayoutManager(mainActivity)
|
||||
adapter = satPassAdapter
|
||||
adapter = passesAdapter
|
||||
isVerticalScrollBarEnabled = false
|
||||
(itemAnimator as SimpleItemAnimator).supportsChangeAnimations = false
|
||||
}
|
||||
satPassAdapter.setList(satPassList)
|
||||
passesAdapter.setList(satPassList)
|
||||
setTimer()
|
||||
|
||||
// binding.refLayoutPassList.setProgressBackgroundColorSchemeResource(R.color.themeAccent)
|
||||
// binding.refLayoutPassList.setColorSchemeResources(R.color.backgroundDark)
|
||||
// binding.refLayoutPassList.setOnRefreshListener { viewModel.calculatePasses() }
|
||||
binding.toolbarFilter.setOnClickListener {
|
||||
binding.passesFilter.setOnClickListener {
|
||||
showSatPassPrefsDialog(viewModel.getHoursAhead(), viewModel.getMinElevation())
|
||||
}
|
||||
binding.fabSatSelect.setOnClickListener {
|
||||
binding.passesFab.setOnClickListener {
|
||||
lifecycleScope.launch {
|
||||
val list = viewModel.getAllEntries() as MutableList
|
||||
if (list.isEmpty()) {
|
||||
@@ -134,7 +122,7 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
}
|
||||
|
||||
private fun showSatPassPrefsDialog(hoursAhead: Int, minEl: Double) {
|
||||
val satPassPrefView = View.inflate(mainActivity, R.layout.dialog_pass_pref, null)
|
||||
val satPassPrefView = View.inflate(mainActivity, R.layout.dialog_passes, null)
|
||||
val etHoursAhead = satPassPrefView.findViewById<EditText>(R.id.pref_et_hoursAhead)
|
||||
val etMinEl = satPassPrefView.findViewById<EditText>(R.id.pref_et_minEl)
|
||||
etHoursAhead.setText(hoursAhead.toString())
|
||||
@@ -172,15 +160,15 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
}
|
||||
|
||||
private fun showSelectSatDialog(tleMainList: MutableList<SatEntry>) {
|
||||
val listener = object : SatEntryDialogFragment.EntriesSubmitListener {
|
||||
val listener = object : EntriesDialog.EntriesSubmitListener {
|
||||
override fun onEntriesSubmit(catNumList: MutableList<Int>) {
|
||||
viewModel.updateEntriesSelection(catNumList)
|
||||
}
|
||||
}
|
||||
|
||||
SatEntryDialogFragment(tleMainList).apply {
|
||||
EntriesDialog(tleMainList).apply {
|
||||
setEntriesListener(listener)
|
||||
show(mainActivity.supportFragmentManager, "SatEntryDialogFragment")
|
||||
show(mainActivity.supportFragmentManager, "EntriesDialog")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,13 +198,13 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
}
|
||||
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
binding.toolbarTimer.text = String.format(
|
||||
binding.passesTimer.text = String.format(
|
||||
mainActivity.getString(R.string.pat_timer),
|
||||
TimeUnit.MILLISECONDS.toHours(millisUntilFinished) % 60,
|
||||
TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished) % 60,
|
||||
TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) % 60
|
||||
)
|
||||
satPassAdapter.updateRecycler()
|
||||
passesAdapter.updateRecycler()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,13 +218,13 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
}
|
||||
|
||||
override fun onTick(millisUntilFinished: Long) {
|
||||
binding.toolbarTimer.text = String.format(
|
||||
binding.passesTimer.text = String.format(
|
||||
mainActivity.getString(R.string.pat_timer),
|
||||
TimeUnit.MILLISECONDS.toHours(millisUntilFinished) % 60,
|
||||
TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished) % 60,
|
||||
TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) % 60
|
||||
)
|
||||
satPassAdapter.updateRecycler()
|
||||
passesAdapter.updateRecycler()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,7 +234,7 @@ class PassListFragment : Fragment(R.layout.fragment_pass_list) {
|
||||
aosTimer.cancel()
|
||||
isTimerSet = false
|
||||
}
|
||||
if (resetToNull) binding.toolbarTimer.text =
|
||||
if (resetToNull) binding.passesTimer.text =
|
||||
String.format(getString(R.string.pat_timer), 0, 0, 0)
|
||||
}
|
||||
}
|
||||
+17
-17
@@ -34,9 +34,9 @@ import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.dagger.ViewModelFactory
|
||||
import com.rtbishop.look4sat.data.Result
|
||||
import com.rtbishop.look4sat.data.SatPass
|
||||
import com.rtbishop.look4sat.databinding.FragmentPolarViewBinding
|
||||
import com.rtbishop.look4sat.databinding.FragmentPolarBinding
|
||||
import com.rtbishop.look4sat.ui.SharedViewModel
|
||||
import com.rtbishop.look4sat.ui.adapters.TransmitterAdapter
|
||||
import com.rtbishop.look4sat.ui.adapters.TransAdapter
|
||||
import com.rtbishop.look4sat.ui.views.PolarView
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -44,28 +44,28 @@ import java.util.*
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.round
|
||||
|
||||
class PolarViewFragment : Fragment(R.layout.fragment_polar_view), SensorEventListener {
|
||||
class PolarFragment : Fragment(R.layout.fragment_polar), SensorEventListener {
|
||||
|
||||
@Inject
|
||||
lateinit var modelFactory: ViewModelFactory
|
||||
private lateinit var mainActivity: FragmentActivity
|
||||
private lateinit var viewModel: SharedViewModel
|
||||
private lateinit var binding: FragmentPolarViewBinding
|
||||
private lateinit var binding: FragmentPolarBinding
|
||||
private lateinit var satPass: SatPass
|
||||
private lateinit var sensorManager: SensorManager
|
||||
private var polarView: PolarView? = null
|
||||
private val args: PolarViewFragmentArgs by navArgs()
|
||||
private val transmitterAdapter = TransmitterAdapter()
|
||||
private val args: PolarFragmentArgs by navArgs()
|
||||
private val transmitterAdapter = TransAdapter()
|
||||
private var magneticDeclination = 0f
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
mainActivity = requireActivity()
|
||||
binding = FragmentPolarViewBinding.bind(view)
|
||||
binding = FragmentPolarBinding.bind(view)
|
||||
(mainActivity.application as Look4SatApp).appComponent.inject(this)
|
||||
viewModel = ViewModelProvider(mainActivity, modelFactory).get(SharedViewModel::class.java)
|
||||
sensorManager = mainActivity.getSystemService(Context.SENSOR_SERVICE) as SensorManager
|
||||
binding.recPolar.apply {
|
||||
binding.recycler.apply {
|
||||
layoutManager = LinearLayoutManager(mainActivity)
|
||||
adapter = transmitterAdapter
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class PolarViewFragment : Fragment(R.layout.fragment_polar_view), SensorEventLis
|
||||
val refreshRate = viewModel.getRefreshRate()
|
||||
satPass = result.data[args.satPassIndex]
|
||||
polarView = PolarView(mainActivity, satPass)
|
||||
binding.framePolar.addView(polarView)
|
||||
binding.frame.addView(polarView)
|
||||
observeTransmitters()
|
||||
refreshText(refreshRate)
|
||||
}
|
||||
@@ -124,11 +124,11 @@ class PolarViewFragment : Fragment(R.layout.fragment_polar_view), SensorEventLis
|
||||
transmitterAdapter.setPredictor(satPass.predictor)
|
||||
transmitterAdapter.setList(it)
|
||||
transmitterAdapter.notifyDataSetChanged()
|
||||
binding.recPolar.visibility = View.VISIBLE
|
||||
binding.tvPolarNoTrans.visibility = View.INVISIBLE
|
||||
binding.recycler.visibility = View.VISIBLE
|
||||
binding.noTransMsg.visibility = View.INVISIBLE
|
||||
} else {
|
||||
binding.recPolar.visibility = View.INVISIBLE
|
||||
binding.tvPolarNoTrans.visibility = View.VISIBLE
|
||||
binding.recycler.visibility = View.INVISIBLE
|
||||
binding.noTransMsg.visibility = View.VISIBLE
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -164,9 +164,9 @@ class PolarViewFragment : Fragment(R.layout.fragment_polar_view), SensorEventLis
|
||||
val polarEl = mainActivity.getString(R.string.pat_elevation)
|
||||
val polarRng = mainActivity.getString(R.string.pat_distance)
|
||||
val polarAlt = mainActivity.getString(R.string.pat_altitude)
|
||||
binding.tvPolarAz.text = String.format(polarAz, Math.toDegrees(satPos.azimuth))
|
||||
binding.tvPolarEl.text = String.format(polarEl, Math.toDegrees(satPos.elevation))
|
||||
binding.tvPolarRng.text = String.format(polarRng, satPos.range)
|
||||
binding.tvPolarAlt.text = String.format(polarAlt, satPos.altitude)
|
||||
binding.azimuth.text = String.format(polarAz, Math.toDegrees(satPos.azimuth))
|
||||
binding.elevation.text = String.format(polarEl, Math.toDegrees(satPos.elevation))
|
||||
binding.distance.text = String.format(polarRng, satPos.range)
|
||||
binding.altitude.text = String.format(polarAlt, satPos.altitude)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -27,7 +27,7 @@ import androidx.preference.PreferenceFragmentCompat
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.utility.Extensions.snack
|
||||
|
||||
class PreferencesFragment : PreferenceFragmentCompat(),
|
||||
class PrefsFragment : PreferenceFragmentCompat(),
|
||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
|
||||
private lateinit var keyLat: String
|
||||
+6
-6
@@ -26,18 +26,18 @@ import android.view.Window
|
||||
import androidx.appcompat.app.AppCompatDialogFragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.rtbishop.look4sat.data.TleSource
|
||||
import com.rtbishop.look4sat.databinding.DialogTleSourcesBinding
|
||||
import com.rtbishop.look4sat.ui.adapters.TleSourcesAdapter
|
||||
import com.rtbishop.look4sat.databinding.DialogSourcesBinding
|
||||
import com.rtbishop.look4sat.ui.adapters.SourcesAdapter
|
||||
|
||||
class TleSourcesDialogFragment(sources: List<TleSource>) :
|
||||
class SourcesDialog(sources: List<TleSource>) :
|
||||
AppCompatDialogFragment() {
|
||||
|
||||
private lateinit var sourcesListener: SourcesSubmitListener
|
||||
private val emptySource = TleSource("")
|
||||
private val sourcesAdapter = TleSourcesAdapter(sources.toMutableList())
|
||||
private val sourcesAdapter = SourcesAdapter(sources.toMutableList())
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val binding = DialogTleSourcesBinding.inflate(requireActivity().layoutInflater)
|
||||
val binding = DialogSourcesBinding.inflate(requireActivity().layoutInflater)
|
||||
val tleSourcesDialog = Dialog(requireActivity()).apply {
|
||||
window?.requestFeature(Window.FEATURE_NO_TITLE)
|
||||
setContentView(binding.root)
|
||||
@@ -70,7 +70,7 @@ class TleSourcesDialogFragment(sources: List<TleSource>) :
|
||||
return tleSourcesDialog
|
||||
}
|
||||
|
||||
fun setSourcesListener(listener: SourcesSubmitListener): TleSourcesDialogFragment {
|
||||
fun setSourcesListener(listener: SourcesSubmitListener): SourcesDialog {
|
||||
sourcesListener = listener
|
||||
return this
|
||||
}
|
||||
@@ -1,171 +0,0 @@
|
||||
package com.rtbishop.look4sat.ui.views
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.*
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.github.amsacode.predict4java.GroundStationPosition
|
||||
import com.github.amsacode.predict4java.Position
|
||||
import com.github.amsacode.predict4java.SatPos
|
||||
import com.github.amsacode.predict4java.TLE
|
||||
import com.rtbishop.look4sat.R
|
||||
import com.rtbishop.look4sat.data.SatPass
|
||||
import java.util.*
|
||||
import kotlin.math.abs
|
||||
|
||||
class MapView(context: Context) : View(context) {
|
||||
|
||||
constructor(context: Context, groundStationPosition: GroundStationPosition) : this(context) {
|
||||
gsp = groundStationPosition
|
||||
}
|
||||
|
||||
private lateinit var passList: List<SatPass>
|
||||
private lateinit var gsp: GroundStationPosition
|
||||
private lateinit var selectedSat: TLE
|
||||
private val scale = resources.displayMetrics.density
|
||||
private val groundTrackPaint = Paint().apply {
|
||||
isAntiAlias = true
|
||||
color = ContextCompat.getColor(context, R.color.satTrack)
|
||||
style = Paint.Style.STROKE
|
||||
strokeWidth = scale
|
||||
}
|
||||
private val satPaintPrim = Paint().apply {
|
||||
isAntiAlias = true
|
||||
color = ContextCompat.getColor(context, R.color.satPrimary)
|
||||
style = Paint.Style.STROKE
|
||||
strokeWidth = scale
|
||||
}
|
||||
private val satPaintSec = Paint().apply {
|
||||
isAntiAlias = true
|
||||
color = ContextCompat.getColor(context, R.color.satSecondary)
|
||||
style = Paint.Style.STROKE
|
||||
strokeWidth = scale
|
||||
}
|
||||
private val txtPaint = Paint().apply {
|
||||
isAntiAlias = true
|
||||
color = ContextCompat.getColor(context, R.color.satPrimary)
|
||||
style = Paint.Style.FILL
|
||||
strokeWidth = scale
|
||||
textSize = 16f
|
||||
setShadowLayer(2f, 2f, 2f, Color.BLACK)
|
||||
}
|
||||
private val outlinePaint = Paint().apply {
|
||||
isAntiAlias = true
|
||||
color = Color.BLACK
|
||||
style = Paint.Style.FILL_AND_STROKE
|
||||
strokeWidth = scale
|
||||
textSize = 16f
|
||||
}
|
||||
private val rect = Rect()
|
||||
private var checked = 0
|
||||
private var degLon = 0f
|
||||
private var degLat = 0f
|
||||
|
||||
fun setList(satPassList: List<SatPass>) {
|
||||
passList = satPassList
|
||||
}
|
||||
|
||||
fun setChecked(item: Int) {
|
||||
checked = item
|
||||
selectedSat = passList[checked].tle
|
||||
}
|
||||
|
||||
@SuppressLint("DrawAllocation")
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
degLon = width / 360f
|
||||
degLat = height / 180f
|
||||
canvas.translate(width / 2f, height / 2f)
|
||||
drawHomeLoc(canvas)
|
||||
val currentTime = Date(System.currentTimeMillis())
|
||||
val orbitalPeriod = (24 * 60 / selectedSat.meanmo).toInt()
|
||||
val predictor = passList[checked].predictor
|
||||
val positions = predictor.getPositions(currentTime, 60, 0, orbitalPeriod * 3)
|
||||
drawGroundTrack(canvas, positions)
|
||||
passList.forEach { satPass -> drawSat(canvas, satPass, currentTime, satPaintSec) }
|
||||
drawSat(canvas, passList[checked], currentTime, satPaintPrim)
|
||||
}
|
||||
|
||||
private fun drawHomeLoc(canvas: Canvas) {
|
||||
val lon = gsp.longitude.toFloat()
|
||||
val lat = gsp.latitude.toFloat() * -1
|
||||
val cx = lon * degLon
|
||||
val cy = lat * degLat
|
||||
val gspName = context.getString(R.string.map_gsp)
|
||||
txtPaint.getTextBounds(gspName, 0, gspName.length, rect)
|
||||
canvas.drawCircle(cx, cy, scale * 2, txtPaint)
|
||||
canvas.drawText(gspName, cx - rect.width() / 2, cy - txtPaint.textSize, outlinePaint)
|
||||
canvas.drawText(gspName, cx - rect.width() / 2, cy - txtPaint.textSize, txtPaint)
|
||||
|
||||
}
|
||||
|
||||
private fun drawGroundTrack(canvas: Canvas, list: List<SatPos>) {
|
||||
val path = Path()
|
||||
var lon: Float
|
||||
var lat: Float
|
||||
var lastLon = 181f
|
||||
|
||||
list.withIndex().forEach { (index, satPos) ->
|
||||
lon = Math.toDegrees(satPos.longitude).toFloat()
|
||||
lat = Math.toDegrees(satPos.latitude).toFloat() * -1
|
||||
|
||||
if (lon > 180f) lon -= 360f
|
||||
|
||||
lon *= degLon
|
||||
lat *= degLat
|
||||
|
||||
if (index == 0 || abs(lon - lastLon) > 180) path.moveTo(lon, lat)
|
||||
else path.lineTo(lon, lat)
|
||||
|
||||
lastLon = lon
|
||||
}
|
||||
canvas.drawPath(path, groundTrackPaint)
|
||||
}
|
||||
|
||||
private fun drawSat(canvas: Canvas, satPass: SatPass, date: Date, paint: Paint) {
|
||||
val tle = satPass.tle
|
||||
val predictor = satPass.predictor
|
||||
val satPosNow = predictor.getSatPos(date)
|
||||
val footprintPosList = satPosNow.rangeCircle
|
||||
drawFootprint(canvas, footprintPosList, paint)
|
||||
drawName(canvas, satPosNow, tle.name)
|
||||
}
|
||||
|
||||
private fun drawFootprint(canvas: Canvas, list: List<Position>, paint: Paint) {
|
||||
val path = Path()
|
||||
var lon: Float
|
||||
var lat: Float
|
||||
var lastLon = 181f
|
||||
|
||||
list.withIndex().forEach { (index, position) ->
|
||||
lon = position.lon.toFloat()
|
||||
lat = position.lat.toFloat() * -1
|
||||
|
||||
if (lon > 180f) lon -= 360f
|
||||
|
||||
lon *= degLon
|
||||
lat *= degLat
|
||||
|
||||
if (index == 0 || abs(lon - lastLon) > 180) path.moveTo(lon, lat)
|
||||
else path.lineTo(lon, lat)
|
||||
|
||||
lastLon = lon
|
||||
}
|
||||
canvas.drawPath(path, paint)
|
||||
}
|
||||
|
||||
private fun drawName(canvas: Canvas, position: SatPos, name: String) {
|
||||
var lon = Math.toDegrees(position.longitude).toFloat()
|
||||
val lat = Math.toDegrees(position.latitude).toFloat() * -1
|
||||
|
||||
if (lon > 180f) lon -= 360f
|
||||
|
||||
val cx = lon * degLon
|
||||
val cy = lat * degLat
|
||||
|
||||
canvas.drawCircle(cx, cy, scale * 2, txtPaint)
|
||||
txtPaint.getTextBounds(name, 0, name.length, rect)
|
||||
canvas.drawText(name, cx - rect.width() / 2, cy - txtPaint.textSize, outlinePaint)
|
||||
canvas.drawText(name, cx - rect.width() / 2, cy - txtPaint.textSize, txtPaint)
|
||||
}
|
||||
}
|
||||
@@ -42,31 +42,17 @@ import java.util.*
|
||||
|
||||
class PassPredictor(private val tle: TLE, private val qth: GroundStationPosition) {
|
||||
private val sat: Satellite = SatelliteFactory.createSatellite(tle)
|
||||
private val south = "south"
|
||||
private val north = "north"
|
||||
private val deadSpotNone = "none"
|
||||
private val speedOfLight = 2.99792458E8
|
||||
private val twoPi = Math.PI * 2.0
|
||||
private val timeZone: TimeZone = TimeZone.getTimeZone("UTC")
|
||||
private var iterationCount = 0
|
||||
|
||||
fun getDownlinkFreq(freq: Long, date: Date): Long {
|
||||
val cal = Calendar.getInstance(timeZone).apply {
|
||||
clear()
|
||||
timeInMillis = date.time
|
||||
}
|
||||
val satPos = getSatPos(cal.time)
|
||||
val rangeRate = satPos.rangeRate
|
||||
val rangeRate = getSatPos(date).rangeRate
|
||||
return (freq.toDouble() * (speedOfLight - rangeRate * 1000.0) / speedOfLight).toLong()
|
||||
}
|
||||
|
||||
fun getUplinkFreq(freq: Long, date: Date): Long {
|
||||
val cal = Calendar.getInstance(timeZone).apply {
|
||||
clear()
|
||||
timeInMillis = date.time
|
||||
}
|
||||
val satPos = getSatPos(cal.time)
|
||||
val rangeRate = satPos.rangeRate
|
||||
val rangeRate = getSatPos(date).rangeRate
|
||||
return (freq.toDouble() * (speedOfLight + rangeRate * 1000.0) / speedOfLight).toLong()
|
||||
}
|
||||
|
||||
@@ -155,7 +141,7 @@ class PassPredictor(private val tle: TLE, private val qth: GroundStationPosition
|
||||
var maxElevation = 0.0
|
||||
var elevation: Double
|
||||
var prevPos: SatPos
|
||||
var polePassed = deadSpotNone
|
||||
var polePassed = "none"
|
||||
|
||||
// get the current position
|
||||
val cal = Calendar.getInstance(timeZone).apply {
|
||||
@@ -206,7 +192,7 @@ class PassPredictor(private val tle: TLE, private val qth: GroundStationPosition
|
||||
do {
|
||||
satPos = getPosition(cal, 30)
|
||||
val currPolePassed = getPolePassed(prevPos, satPos)
|
||||
if (currPolePassed != deadSpotNone) {
|
||||
if (currPolePassed != "none") {
|
||||
polePassed = currPolePassed
|
||||
}
|
||||
elevation = satPos.elevation
|
||||
@@ -242,23 +228,17 @@ class PassPredictor(private val tle: TLE, private val qth: GroundStationPosition
|
||||
}
|
||||
|
||||
private fun getPolePassed(prevPos: SatPos, satPos: SatPos): String {
|
||||
var polePassed = deadSpotNone
|
||||
val az1 = prevPos.azimuth / twoPi * 360.0
|
||||
val az2 = satPos.azimuth / twoPi * 360.0
|
||||
var polePassed = "none"
|
||||
val north = "north"
|
||||
val south = "south"
|
||||
val az1 = Math.toDegrees(prevPos.azimuth)
|
||||
val az2 = Math.toDegrees(satPos.azimuth)
|
||||
if (az1 > az2) {
|
||||
// we may be moving from 350 or greater through north
|
||||
if (az1 > 350 && az2 < 10) polePassed = north
|
||||
else {
|
||||
// we may be moving from 190 or greater through south
|
||||
if (az1 > 180 && az2 < 180) polePassed = south
|
||||
}
|
||||
else if (az1 > 180 && az2 < 180) polePassed = south
|
||||
} else {
|
||||
// we may be moving from 10 or less through north
|
||||
if (az1 < 10 && az2 > 350) polePassed = north
|
||||
else {
|
||||
// we may be moving from 170 or more through south
|
||||
if (az1 < 180 && az2 > 180) polePassed = south
|
||||
}
|
||||
else if (az1 < 180 && az2 > 180) polePassed = south
|
||||
}
|
||||
return polePassed
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB |
@@ -1,9 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
||||
</vector>
|
||||
@@ -20,9 +20,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z" />
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#C0C0C0"
|
||||
android:pathData="M20,12l-1.41,-1.41L13,16.17V4h-2v12.17l-5.58,-5.59L4,12l8,8 8,-8z" />
|
||||
</vector>
|
||||
@@ -1,7 +0,0 @@
|
||||
<vector android:height="24dp" android:viewportHeight="100"
|
||||
android:viewportWidth="100" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFE082" android:pathData="M63.5,45.5c-2.485,0 -4.5,2.015 -4.5,4.5c0,2.485 2.015,4.5 4.5,4.5S68,52.485 68,50C68,47.515 65.985,45.5 63.5,45.5L63.5,45.5z"/>
|
||||
<path android:fillColor="#FFE082" android:pathData="M54.5,23c14.888,0 27,12.112 27,27s-12.112,27 -27,27s-27,-12.112 -27,-27S39.612,23 54.5,23M54.5,18.5C37.103,18.5 23,32.603 23,50s14.103,31.5 31.5,31.5S86,67.397 86,50S71.897,18.5 54.5,18.5L54.5,18.5z"/>
|
||||
<path android:fillColor="#FFE082" android:pathData="M50,9.5c22.332,0 40.5,18.168 40.5,40.5S72.332,90.5 50,90.5S9.5,72.332 9.5,50S27.668,9.5 50,9.5M50,5C25.147,5 5,25.147 5,50s20.147,45 45,45s45,-20.147 45,-45S74.853,5 50,5L50,5z"/>
|
||||
<path android:fillColor="#FFE082" android:pathData="M59,36.5c7.444,0 13.5,6.056 13.5,13.5c0,7.444 -6.056,13.5 -13.5,13.5c-7.444,0 -13.5,-6.056 -13.5,-13.5C45.5,42.556 51.556,36.5 59,36.5M59,32c-9.941,0 -18,8.059 -18,18s8.059,18 18,18s18,-8.059 18,-18S68.941,32 59,32L59,32z"/>
|
||||
</vector>
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="@color/themeIcon"
|
||||
android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z" />
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#C0C0C0"
|
||||
android:pathData="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z" />
|
||||
</vector>
|
||||
+3
-3
@@ -19,12 +19,12 @@
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="28dp"
|
||||
android:height="28dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeIcon"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,0.297c-6.63,0 -12,5.373 -12,12 0,5.303 3.438,9.8 8.205,11.385 0.6,0.113 0.82,-0.258 0.82,-0.577 0,-0.285 -0.01,-1.04 -0.015,-2.04 -3.338,0.724 -4.042,-1.61 -4.042,-1.61C4.422,18.07 3.633,17.7 3.633,17.7c-1.087,-0.744 0.084,-0.729 0.084,-0.729 1.205,0.084 1.838,1.236 1.838,1.236 1.07,1.835 2.809,1.305 3.495,0.998 0.108,-0.776 0.417,-1.305 0.76,-1.605 -2.665,-0.3 -5.466,-1.332 -5.466,-5.93 0,-1.31 0.465,-2.38 1.235,-3.22 -0.135,-0.303 -0.54,-1.523 0.105,-3.176 0,0 1.005,-0.322 3.3,1.23 0.96,-0.267 1.98,-0.399 3,-0.405 1.02,0.006 2.04,0.138 3,0.405 2.28,-1.552 3.285,-1.23 3.285,-1.23 0.645,1.653 0.24,2.873 0.12,3.176 0.765,0.84 1.23,1.91 1.23,3.22 0,4.61 -2.805,5.625 -5.475,5.92 0.42,0.36 0.81,1.096 0.81,2.22 0,1.606 -0.015,2.896 -0.015,3.286 0,0.315 0.21,0.69 0.825,0.57C20.565,22.092 24,17.592 24,12.297c0,-6.627 -5.373,-12 -12,-12"
|
||||
tools:ignore="VectorPath" />
|
||||
</vector>
|
||||
@@ -1,7 +1,6 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/themeAccent"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="@color/themeAccent"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
<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:fillColor="@color/themeAccent"
|
||||
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z" />
|
||||
</vector>
|
||||
+1
-2
@@ -1,10 +1,9 @@
|
||||
<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:fillColor="@color/themeAccent"
|
||||
android:pathData="M4,10.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM4,4.5c-0.83,0 -1.5,0.67 -1.5,1.5S3.17,7.5 4,7.5 5.5,6.83 5.5,6 4.83,4.5 4,4.5zM4,16.5c-0.83,0 -1.5,0.68 -1.5,1.5s0.68,1.5 1.5,1.5 1.5,-0.68 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM7,19h14v-2L7,17v2zM7,13h14v-2L7,11v2zM7,5v2h14L21,5L7,5z" />
|
||||
</vector>
|
||||
+4
-23
@@ -1,33 +1,14 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="128"
|
||||
android:viewportHeight="128">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="m96.642,31.504c7.911,7.997 17.143,13.584 25.365,15.581l1.754,-3.997C123.78,43.048 123.786,43.005 123.802,42.965 125.834,38.995 127,34.495 127,29.715 127,13.881 114.379,1 98.867,1c-5.125,0 -9.92,1.429 -14.064,3.884l-3.398,1.598c0.08,0.306 0.133,0.599 0.221,0.91 2.32,8.104 7.652,16.667 15.016,24.112z" />
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M93.876,34.3C86.053,26.391 80.369,17.225 77.87,8.49 77.84,8.385 77.818,8.285 77.788,8.181L2.629,43.513c-1.404,0.66 -2.019,2.358 -1.372,3.791 0.472,1.046 1.485,1.663 2.545,1.663 0.392,0 0.79,-0.084 1.169,-0.263L74.045,16.235c-1.873,3.578 -2.997,7.611 -3.228,11.885L35.566,51.732c-1.294,0.866 -1.653,2.638 -0.805,3.957 0.538,0.836 1.431,1.29 2.344,1.29 0.526,0 1.06,-0.151 1.533,-0.469L71.189,34.707c1.4,8.11 6.135,15.044 12.715,19.285l-54.945,68.337c-0.981,1.22 -0.808,3.021 0.388,4.023 0.521,0.437 1.149,0.649 1.775,0.649 0.809,0 1.611,-0.357 2.166,-1.045L89.056,56.595c3.06,1.168 6.357,1.838 9.811,1.838 4.932,0 9.566,-1.312 13.601,-3.597L84.602,118.323c-0.633,1.44 0,3.131 1.41,3.777 0.372,0.17 0.76,0.25 1.144,0.25 1.07,0 2.092,-0.629 2.556,-1.691L120.402,50.739C111.642,48.416 102.042,42.555 93.876,34.3Z"
|
||||
tools:ignore="VectorPath" />
|
||||
</vector>
|
||||
@@ -20,9 +20,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5 5,-2.24 5,-5 -2.24,-5 -5,-5zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
</vector>
|
||||
@@ -20,9 +20,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeLight"
|
||||
android:pathData="M3,17v2h6v-2L3,17zM3,5v2h10L13,5L3,5zM13,21v-2h8v-2h-8v-2h-2v6h2zM7,9v2L3,11v2h4v2h2L9,9L7,9zM21,13v-2L11,11v2h10zM15,9h2L17,7h4L21,5h-4L17,3h-2v6z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,6v3l4,-4 -4,-4v3c-4.42,0 -8,3.58 -8,8 0,1.57 0.46,3.03 1.24,4.26L6.7,14.8c-0.45,-0.83 -0.7,-1.79 -0.7,-2.8 0,-3.31 2.69,-6 6,-6zM18.76,7.74L17.3,9.2c0.44,0.84 0.7,1.79 0.7,2.8 0,3.31 -2.69,6 -6,6v-3l-4,4 4,4v-3c4.42,0 8,-3.58 8,-8 0,-1.57 -0.46,-3.03 -1.24,-4.26z" />
|
||||
</vector>
|
||||
@@ -1,57 +0,0 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:viewportWidth="128"
|
||||
android:viewportHeight="128">
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m105.138,13.879a2.864,2.864 90,0 1,1.701 0.85l19.334,19.331a2.864,2.864 90,0 1,-0 4.027l-26.584,26.625a2.864,2.864 90,0 1,-1.835 0.805l-7.922,0.626 5.773,5.772a2.864,2.864 90,0 1,-0 4.027l-19.602,19.644a2.864,2.864 90,0 1,-4.073 0l-5.773,-5.772 -0.627,7.92a2.864,2.864 90,0 1,-0.805 1.835l-26.629,26.58a2.864,2.864 90,0 1,-4.073 0l-19.289,-19.286a2.864,2.864 90,0 1,-0 -4.072l26.584,-26.625a2.864,2.864 90,0 1,1.835 -0.805l7.922,-0.626 -5.773,-5.772a2.864,2.864 90,0 1,-0 -4.072l19.603,-19.599a2.864,2.864 90,0 1,4.073 0l5.773,5.772 0.626,-7.92a2.864,2.864 90,0 1,0.806 -1.835l26.629,-26.58a2.864,2.864 90,0 1,2.059 -0.85,2.864 2.864,90 0,1 0.269,0zM104.825,20.77 L80.97,44.62 80.165,55.315 85.58,60.729 96.276,59.879 120.13,36.074zM55.326,80.15 L44.629,81 20.775,104.806 36.081,120.109 59.891,96.259 60.741,85.564z"
|
||||
android:strokeColor="#00000000"
|
||||
tools:ignore="VectorPath" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m62.653,12.194a2.864,2.864 90,1 1,-0 5.727c-11.457,0 -22.876,4.351 -31.634,13.107 -8.741,8.74 -13.095,20.174 -13.095,31.614a2.864,2.864 90,1 1,-5.728 0c-0,-12.897 4.935,-25.829 14.773,-35.664 9.85,-9.848 22.772,-14.785 35.684,-14.785z"
|
||||
android:strokeColor="#00000000" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m62.653,1a2.864,2.864 90,1 1,-0 5.727c-14.325,0 -28.612,5.441 -39.547,16.375 -10.935,10.933 -16.378,25.233 -16.378,39.541a2.864,2.864 90,1 1,-5.728 0c-0,-15.763 6.025,-31.562 18.055,-43.59 12.029,-12.028 27.818,-18.052 43.597,-18.052z"
|
||||
android:strokeColor="#00000000" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m62.653,23.302a2.864,2.864 90,1 1,-0 5.727c-8.62,0 -17.201,3.263 -23.778,9.839 -6.577,6.576 -9.855,15.174 -9.855,23.774a2.864,2.864 90,1 1,-5.728 0c-0,-10.061 3.861,-20.153 11.533,-27.824 7.672,-7.671 17.756,-11.517 27.829,-11.517z"
|
||||
android:strokeColor="#00000000" />
|
||||
<path
|
||||
android:fillAlpha="1"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="m62.653,34.525a2.864,2.864 90,1 1,-0 5.727c-5.737,0 -11.453,2.174 -15.836,6.557 -4.384,4.383 -6.558,10.098 -6.558,15.834a2.864,2.864 90,1 1,-5.728 0c-0,-7.192 2.757,-14.406 8.236,-19.883 5.479,-5.478 12.693,-8.234 19.887,-8.234z"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
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>
|
||||
@@ -18,11 +18,11 @@
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z" />
|
||||
</vector>
|
||||
@@ -1,31 +1,9 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:pathData="M6.18,17.82m-2.18,0a2.18,2.18 0,1 1,4.36 0a2.18,2.18 0,1 1,-4.36 0" />
|
||||
<path
|
||||
android:fillColor="#FFE082"
|
||||
android:pathData="M4,4.44v2.83c7.03,0 12.73,5.7 12.73,12.73h2.83c0,-8.59 -6.97,-15.56 -15.56,-15.56zM4,10.1v2.83c3.9,0 7.07,3.17 7.07,7.07h2.83c0,-5.47 -4.43,-9.9 -9.9,-9.9z" />
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,11c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,13c0,-3.31 -2.69,-6 -6,-6s-6,2.69 -6,6c0,2.22 1.21,4.15 3,5.19l1,-1.74c-1.19,-0.7 -2,-1.97 -2,-3.45 0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,1.48 -0.81,2.75 -2,3.45l1,1.74c1.79,-1.04 3,-2.97 3,-5.19zM12,3C6.48,3 2,7.48 2,13c0,3.7 2.01,6.92 4.99,8.65l1,-1.73C5.61,18.53 4,15.96 4,13c0,-4.42 3.58,-8 8,-8s8,3.58 8,8c0,2.96 -1.61,5.53 -4,6.92l1,1.73c2.99,-1.73 5,-4.95 5,-8.65 0,-5.52 -4.48,-10 -10,-10z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="100"
|
||||
android:viewportHeight="100">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M63.5,45.5c-2.485,0 -4.5,2.015 -4.5,4.5c0,2.485 2.015,4.5 4.5,4.5S68,52.485 68,50C68,47.515 65.985,45.5 63.5,45.5L63.5,45.5z" />
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M54.5,23c14.888,0 27,12.112 27,27s-12.112,27 -27,27s-27,-12.112 -27,-27S39.612,23 54.5,23M54.5,18.5C37.103,18.5 23,32.603 23,50s14.103,31.5 31.5,31.5S86,67.397 86,50S71.897,18.5 54.5,18.5L54.5,18.5z" />
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M50,9.5c22.332,0 40.5,18.168 40.5,40.5S72.332,90.5 50,90.5S9.5,72.332 9.5,50S27.668,9.5 50,9.5M50,5C25.147,5 5,25.147 5,50s20.147,45 45,45s45,-20.147 45,-45S74.853,5 50,5L50,5z" />
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M59,36.5c7.444,0 13.5,6.056 13.5,13.5c0,7.444 -6.056,13.5 -13.5,13.5c-7.444,0 -13.5,-6.056 -13.5,-13.5C45.5,42.556 51.556,36.5 59,36.5M59,32c-9.941,0 -18,8.059 -18,18s8.059,18 18,18s18,-8.059 18,-18S68.941,32 59,32L59,32z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M18,2h-8L4.02,8 4,20c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,4c0,-1.1 -0.9,-2 -2,-2zM12,8h-2L10,4h2v4zM15,8h-2L13,4h2v4zM18,8h-2L16,4h2v4z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
|
||||
</vector>
|
||||
+5
-5
@@ -18,11 +18,11 @@
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/themeIcon"
|
||||
android:fillColor="@color/themeAccent"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,19.93c-3.95,-0.49 -7,-3.85 -7,-7.93 0,-0.62 0.08,-1.21 0.21,-1.79L9,15v1c0,1.1 0.9,2 2,2v1.93zM17.9,17.39c-0.26,-0.81 -1,-1.39 -1.9,-1.39h-1v-3c0,-0.55 -0.45,-1 -1,-1L8,12v-2h2c0.55,0 1,-0.45 1,-1L11,7h2c1.1,0 2,-0.9 2,-2v-0.41c2.93,1.19 5,4.06 5,7.41 0,2.08 -0.8,3.97 -2.1,5.39z" />
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.5,3l-0.16,0.03L15,5.1 9,3 3.36,4.9c-0.21,0.07 -0.36,0.25 -0.36,0.48V20.5c0,0.28 0.22,0.5 0.5,0.5l0.16,-0.03L9,18.9l6,2.1 5.64,-1.9c0.21,-0.07 0.36,-0.25 0.36,-0.48V3.5c0,-0.28 -0.22,-0.5 -0.5,-0.5zM15,19l-6,-2.11V5l6,2.11V19z" />
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:opacity="opaque">
|
||||
<item android:drawable="@drawable/ic_launcher_background" />
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@drawable/splash_front" />
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -4,23 +4,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="0dp"
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_frag"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/nav_bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_frag"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/nav_graph" />
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/nav_bottom"
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -29,34 +29,34 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_about_title"
|
||||
android:id="@+id/title"
|
||||
style="@style/AboutTitle"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/app_name"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_about"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/title_img"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/img_about"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_about" />
|
||||
app:layout_constraintStart_toEndOf="@+id/title_img"
|
||||
app:layout_constraintTop_toTopOf="@+id/title_img" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_about"
|
||||
android:id="@+id/title_img"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_sputnik"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_about_title"
|
||||
android:src="@drawable/ic_menu_sat"
|
||||
app:layout_constraintEnd_toStartOf="@+id/title"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_about_version"
|
||||
android:id="@+id/version"
|
||||
style="@style/AboutSubtitle"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
@@ -64,10 +64,10 @@
|
||||
android:text="@string/app_version"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_about_title" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_about_subtitle"
|
||||
android:id="@+id/subtitle"
|
||||
style="@style/AboutSubtitle"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
@@ -75,19 +75,19 @@
|
||||
android:text="@string/about_subtitle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_about_version" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_about_thanks"
|
||||
android:id="@+id/thanks"
|
||||
style="@style/AboutSubtitle"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/about_thanks_to"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_about_subtitle"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_about_subtitle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_about_subtitle" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/subtitle"
|
||||
app:layout_constraintStart_toStartOf="@+id/subtitle"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_about_message"
|
||||
android:id="@+id/message"
|
||||
style="@style/AboutRegular"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
@@ -97,7 +97,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_about_thanks" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/thanks" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/import_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/sat_import"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/import_web"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/import_web" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/import_web"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:backgroundTint="@color/themeDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_update_web"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/import_file"
|
||||
app:layout_constraintEnd_toStartOf="@+id/import_file"
|
||||
app:layout_constraintTop_toTopOf="@+id/import_file" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/import_file"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:backgroundTint="@color/themeDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_update_file"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<SearchView
|
||||
android:id="@+id/search_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:iconifiedByDefault="false"
|
||||
android:queryHint="@string/dialog_entries_hint"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/select_all"
|
||||
app:layout_constraintEnd_toStartOf="@+id/select_all"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/select_all" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/select_all"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:backgroundTint="@color/themeDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_select_all"
|
||||
app:layout_constraintEnd_toEndOf="@+id/import_file"
|
||||
app:layout_constraintTop_toBottomOf="@+id/import_file" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/entries_recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/search_bar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/entries_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/ic_proceed" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
+6
-8
@@ -2,13 +2,12 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/osmLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.fragments.MapOsmFragment">
|
||||
tools:context=".ui.fragments.MapFragment">
|
||||
|
||||
<org.osmdroid.views.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:id="@+id/map_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -17,7 +16,6 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/satInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/backgroundMapInfoLayout"
|
||||
@@ -26,7 +24,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/idName"
|
||||
android:id="@+id/id_name"
|
||||
style="@style/MapOsmSatInfo.Name"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/pat_osm_idName"
|
||||
@@ -41,7 +39,7 @@
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/pat_altitude"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/idName" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/id_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/distance"
|
||||
@@ -61,7 +59,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/latLon"
|
||||
android:id="@+id/lat_lon"
|
||||
style="@style/MapOsmSatInfo"
|
||||
android:text="@string/pat_osm_latLon"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/distance"
|
||||
@@ -70,7 +68,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mapOsmCopyright"
|
||||
android:id="@+id/copyright"
|
||||
style="@style/MapOsmCopyright"
|
||||
android:text="@string/osmCopyright"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -1,205 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<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/refLayoutPassList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="@color/themeAccent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_timer"
|
||||
style="@style/ToolbarText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/toolbar_filter"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/toolbar_filter"
|
||||
style="@style/ToolbarButton"
|
||||
android:contentDescription="@string/placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recPassList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layoutInfo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgInfoSwipe"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:contentDescription="@string/placeholder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideRight"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideTop"
|
||||
app:srcCompat="@drawable/ic_arrow_swipe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInfoSwipe"
|
||||
style="@style/PassInfoText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/info_swipe_text"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideRight"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideLeft"
|
||||
app:layout_constraintTop_toBottomOf="@+id/imgInfoSwipe" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgInfoSputnik"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@string/placeholder"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvInfoMain"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideRight"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideLeft"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvInfoSwipe"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:srcCompat="@drawable/ic_sputnik" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInfoMain"
|
||||
style="@style/PassInfoText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/info_main_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvSatSelect"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideRight"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideCenter"
|
||||
app:layout_constraintVertical_bias="0.32"
|
||||
app:layout_constraintVertical_chainStyle="spread" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSatSelect"
|
||||
style="@style/PassInfoText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="64dp"
|
||||
android:text="@string/info_select_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideBottom"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guideRight"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideLeft" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideTop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="24dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="16dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideCenter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideRight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_end="16dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideBottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_end="16dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSatSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@drawable/ic_sat_asc_left" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android.
|
||||
~ Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
|
||||
~
|
||||
~ This program is free software; you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation; either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along
|
||||
~ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passes_timer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/themeDark"
|
||||
android:textColor="@color/themeAccent"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/passes_filter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/themeDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_prefs"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/passes_timer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/passes_timer" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/passes_recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/passes_timer">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/passes_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@drawable/ic_refresh" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
+18
-18
@@ -22,10 +22,10 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.fragments.PolarViewFragment">
|
||||
tools:context=".ui.fragments.PolarFragment">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_polar"
|
||||
android:id="@+id/frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
@@ -34,49 +34,49 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polar_az"
|
||||
android:id="@+id/azimuth"
|
||||
style="@style/PolarViewText"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/pat_azimuth"
|
||||
app:layout_constraintStart_toStartOf="@+id/frame_polar"
|
||||
app:layout_constraintTop_toTopOf="@+id/frame_polar" />
|
||||
app:layout_constraintStart_toStartOf="@+id/frame"
|
||||
app:layout_constraintTop_toTopOf="@+id/frame" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polar_el"
|
||||
android:id="@+id/elevation"
|
||||
style="@style/PolarViewText"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="@string/pat_elevation"
|
||||
app:layout_constraintEnd_toEndOf="@+id/frame_polar"
|
||||
app:layout_constraintTop_toTopOf="@+id/frame_polar" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/frame"
|
||||
app:layout_constraintTop_toTopOf="@+id/frame" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polar_alt"
|
||||
android:id="@+id/altitude"
|
||||
style="@style/PolarViewText"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/pat_altitude"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/frame_polar"
|
||||
app:layout_constraintStart_toStartOf="@+id/frame_polar" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/frame"
|
||||
app:layout_constraintStart_toStartOf="@+id/frame" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polar_rng"
|
||||
android:id="@+id/distance"
|
||||
style="@style/PolarViewText"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:text="@string/pat_distance"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/frame_polar"
|
||||
app:layout_constraintEnd_toEndOf="@+id/frame_polar" />
|
||||
app:layout_constraintBottom_toBottomOf="@+id/frame"
|
||||
app:layout_constraintEnd_toEndOf="@+id/frame" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rec_polar"
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/frame_polar" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/frame" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_polar_noTrans"
|
||||
android:id="@+id/no_trans_msg"
|
||||
style="@style/PolarViewText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
@@ -86,5 +86,5 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/frame_polar" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/frame" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
+2
-3
@@ -113,7 +113,6 @@
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:rotation="90"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_trans" />
|
||||
@@ -161,7 +160,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/trans_downlink_doppler"
|
||||
app:srcCompat="@drawable/ic_doppler" />
|
||||
app:srcCompat="@drawable/ic_trans_doppler" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/trans_img_uplink_doppler"
|
||||
@@ -176,7 +175,7 @@
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/trans_downlink_doppler"
|
||||
app:srcCompat="@drawable/ic_doppler" />
|
||||
app:srcCompat="@drawable/ic_trans_doppler" />
|
||||
|
||||
|
||||
|
||||
@@ -18,23 +18,23 @@
|
||||
-->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/nav_satellites"
|
||||
android:icon="@drawable/ic_sat_asc_left"
|
||||
android:id="@+id/nav_entries"
|
||||
android:icon="@drawable/ic_menu_sat"
|
||||
android:title="@string/menu_bottom_entries" />
|
||||
<item
|
||||
android:id="@+id/nav_passes"
|
||||
android:icon="@drawable/ic_list"
|
||||
android:icon="@drawable/ic_menu_passes"
|
||||
android:title="@string/menu_bottom_passes" />
|
||||
<item
|
||||
android:id="@+id/nav_world_map"
|
||||
android:icon="@drawable/ic_update_tle"
|
||||
android:id="@+id/nav_map"
|
||||
android:icon="@drawable/ic_world"
|
||||
android:title="@string/menu_bottom_osm" />
|
||||
<item
|
||||
android:id="@+id/nav_settings"
|
||||
android:id="@+id/nav_prefs"
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:title="@string/menu_settings" />
|
||||
<item
|
||||
android:id="@+id/nav_about"
|
||||
android:icon="@drawable/ic_help_outline"
|
||||
android:icon="@drawable/ic_menu_about"
|
||||
android:title="@string/menu_bottom_about" />
|
||||
</menu>
|
||||
@@ -21,20 +21,20 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/mobile_navigation"
|
||||
app:startDestination="@id/nav_passes">
|
||||
app:startDestination="@id/nav_entries">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_satellites"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.AboutFragment" />
|
||||
android:id="@+id/nav_entries"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.EntriesFragment"
|
||||
tools:layout="@layout/fragment_entries" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_passes"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PassListFragment"
|
||||
android:label="@string/menu_pass_list"
|
||||
tools:layout="@layout/fragment_pass_list">
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PassesFragment"
|
||||
tools:layout="@layout/fragment_passes">
|
||||
<action
|
||||
android:id="@+id/action_pass_to_polar"
|
||||
app:destination="@id/nav_polar_view"
|
||||
app:destination="@id/nav_polar"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_enter_anim"
|
||||
@@ -42,31 +42,26 @@
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_polar_view"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PolarViewFragment"
|
||||
android:label="@string/menu_polar_view"
|
||||
tools:layout="@layout/fragment_polar_view">
|
||||
android:id="@+id/nav_polar"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PolarFragment"
|
||||
tools:layout="@layout/fragment_polar">
|
||||
<argument
|
||||
android:name="satPassIndex"
|
||||
app:argType="integer" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_world_map"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.MapOsmFragment"
|
||||
android:label="@string/menu_map_osm"
|
||||
tools:layout="@layout/fragment_map_osm" />
|
||||
android:id="@+id/nav_map"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.MapFragment"
|
||||
tools:layout="@layout/fragment_map" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_settings"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PreferencesFragment"
|
||||
android:label="@string/menu_settings" />
|
||||
android:id="@+id/nav_prefs"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.PrefsFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_about"
|
||||
android:name="com.rtbishop.look4sat.ui.fragments.AboutFragment"
|
||||
android:label="@string/menu_about"
|
||||
tools:layout="@layout/fragment_about" />
|
||||
|
||||
|
||||
</navigation>
|
||||
@@ -158,4 +158,5 @@
|
||||
<string name="map_gsp">СТЦ</string>
|
||||
<string name="tle_source">Источник TLE</string>
|
||||
<string name="https_only">Используйте протокол HTTPS</string>
|
||||
<string name="sat_import">Импорт спутников</string>
|
||||
</resources>
|
||||
@@ -180,4 +180,5 @@
|
||||
<string name="https_only">Please use HTTPS URLs only</string>
|
||||
<string name="placeholder" translatable="false">Placeholder</string>
|
||||
<string name="osmCopyright" translatable="false">Wikimedia maps | Map data © OpenStreetMap contributors</string>
|
||||
<string name="sat_import">Import satellite data</string>
|
||||
</resources>
|
||||
@@ -33,56 +33,6 @@
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Splash" parent="AppTheme">
|
||||
<item name="android:windowBackground">@drawable/splash_drawable</item>
|
||||
</style>
|
||||
|
||||
<style name="DrawerHeader">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textColor">@color/themeLight</item>
|
||||
</style>
|
||||
|
||||
<style name="DrawerHeader.Title">
|
||||
<item name="android:textSize">42sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="DrawerHeader.Item">
|
||||
<item name="android:textSize">21sp</item>
|
||||
<item name="android:fontFamily">serif</item>
|
||||
</style>
|
||||
|
||||
<style name="DrawerHeader.ItemValue">
|
||||
<item name="android:textSize">25sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="DrawerHeader.Button">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:gravity">start|center_vertical</item>
|
||||
<item name="android:textColor">@color/themeAccent</item>
|
||||
<item name="android:backgroundTint">@color/themeButton</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarText">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">36sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/themeAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarButton">
|
||||
<item name="android:layout_width">48dp</item>
|
||||
<item name="android:layout_height">48dp</item>
|
||||
<item name="android:src">@drawable/ic_filter</item>
|
||||
<item name="android:backgroundTint">@color/themeDark</item>
|
||||
</style>
|
||||
|
||||
<style name="CardPassText">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
|
||||
Reference in new issue
Block a user