Minor visual changes to map info

This commit is contained in:
Arty Bishop committed 2021-03-28 17:47:20 +01:00
1 parent 2ba06c779f
commit aef560942f
7 files changed
+87 -81

No files matched your search

@@ -107,9 +107,8 @@ class MapFragment : Fragment(R.layout.fragment_map) {
altitude.text = String.format(getString(R.string.pat_altitude), sat.altitude)
distance.text = String.format(getString(R.string.pat_distance), sat.range)
velocity.text = String.format(getString(R.string.pat_osm_vel), sat.velocity)
latLon.text =
String.format(getString(R.string.pat_osm_latLon), sat.osmPos.lat, sat.osmPos.lon)
mapCoverage.text = String.format(getString(R.string.map_coverage), sat.coverage)
mapLat.text = String.format(getString(R.string.pat_osm_lat), sat.osmPos.lat)
mapLon.text = String.format(getString(R.string.pat_osm_lon), sat.osmPos.lon)
mapView.overlays[1] = sat.groundTrack
mapView.overlays[2] = sat.footprint
mapView.invalidate()
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="@color/mapInfoLayout" />
<solid android:color="@color/mapInfoLayout" />
<corners android:radius="8dp" />
</shape>
+57 -66
View File
@@ -19,120 +19,111 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/mapInfoLayout"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:background="@drawable/map_info_rounded"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/qthLocator"
android:id="@+id/mapLat"
style="@style/MapInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/map_qth"
android:textColor="@color/themeLight"
app:layout_constraintBaseline_toBaselineOf="@+id/velocity"
app:layout_constraintEnd_toEndOf="@+id/distance"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/velocity" />
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:text="@string/pat_osm_lat"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/idName"
android:id="@+id/mapLon"
style="@style/MapInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/pat_osm_idName"
android:textColor="@color/themeLight"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="@+id/distance"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/altitude"
app:layout_constraintTop_toBottomOf="@+id/latLon" />
android:text="@string/pat_osm_lon"
app:layout_constraintStart_toStartOf="@+id/mapLat"
app:layout_constraintTop_toBottomOf="@+id/mapLat" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/qthLocator"
style="@style/MapInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/map_qth"
app:layout_constraintStart_toStartOf="@+id/mapLon"
app:layout_constraintTop_toBottomOf="@+id/mapLon" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/altitude"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="4dp"
style="@style/MapInfoText"
android:text="@string/pat_altitude"
android:textColor="@color/themeLight"
app:layout_constraintEnd_toStartOf="@+id/distance"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:text="@string/pat_distance"
android:textColor="@color/themeLight"
app:layout_constraintBaseline_toBaselineOf="@+id/altitude"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/altitude" />
android:layout_marginEnd="8dp"
app:layout_constraintBaseline_toBaselineOf="@+id/mapLat"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/velocity"
style="@style/MapInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="4dp"
android:text="@string/pat_osm_vel"
android:textColor="@color/themeLight"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/qthLocator"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="@+id/altitude"
app:layout_constraintTop_toBottomOf="@+id/idName" />
app:layout_constraintBaseline_toBaselineOf="@+id/qthLocator"
app:layout_constraintEnd_toEndOf="@+id/distance" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/latLon"
android:id="@+id/distance"
style="@style/MapInfoText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pat_osm_latLon"
android:textColor="@color/themeLight"
app:layout_constraintBaseline_toBaselineOf="@+id/altitude"
app:layout_constraintEnd_toEndOf="@+id/distance"
app:layout_constraintStart_toStartOf="@+id/altitude" />
android:text="@string/pat_distance"
app:layout_constraintBaseline_toBaselineOf="@+id/mapLon"
app:layout_constraintEnd_toEndOf="@+id/altitude" />
<TextView
android:id="@+id/mapCoverage"
<com.google.android.material.textview.MaterialTextView
android:id="@+id/idName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/map_coverage"
android:textColor="@color/themeLight"
app:layout_constraintBaseline_toBaselineOf="@+id/velocity"
app:layout_constraintEnd_toEndOf="@+id/qthLocator"
app:layout_constraintStart_toStartOf="@+id/velocity" />
style="@style/MapInfoText"
android:layout_marginBottom="4dp"
android:text="@string/pat_osm_idName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/qthLocator" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
<ImageButton
android:id="@+id/fabPrev"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="@dimen/fab_padding"
android:layout_marginBottom="@dimen/fab_padding"
android:contentDescription="@string/placeholder"
android:rotation="180"
android:backgroundTint="@color/greySurface"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/ic_next" />
android:src="@drawable/ic_next" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
<ImageButton
android:id="@+id/fabNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginEnd="@dimen/fab_padding"
android:layout_marginBottom="@dimen/fab_padding"
android:backgroundTint="@color/greySurface"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_next" />
android:src="@drawable/ic_next" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/copyright"
+8 -6
View File
@@ -33,14 +33,16 @@
<string name="trans_inverted">Инверсия: %s</string>
<string name="trans_no_data">Не найдены трансиверы для этого спутника</string>
<string name="map_qth">QTH Локатор: %s</string>
<string name="map_coverage">Покрытие: %.0fкм</string>
<string name="pat_azimuth">Азим: %.1f°</string>
<string name="pat_elevation">Элев: %.1f°</string>
<string name="pat_distance">Дст: %.0fкм</string>
<string name="pat_altitude">Выс: %.0fкм</string>
<string name="pat_osm_latLon">Шир: %.1f°, Дол: %.1f°</string>
<string name="pat_osm_vel">Скр: %.2fкм/с</string>
<string name="pat_azimuth">Азимут: %.1f°</string>
<string name="pat_elevation">Элевация: %.1f°</string>
<string name="pat_distance">Дистанция: %.0fкм</string>
<string name="pat_altitude">Высота: %.0fкм</string>
<string name="pat_osm_lat">Широта: %.1f°</string>
<string name="pat_osm_lon">Долгота: %.1f°</string>
<string name="pat_osm_vel">Скорость: %.2fкм/с</string>
<string name="pref_gsp_title">Местоположение наземной станции</string>
<string name="pref_pos_gps">Установить позицию по данным GPS</string>
+1 -1
View File
@@ -6,5 +6,5 @@
<color name="greyLight">#D0D0D0</color>
<color name="greyDivider">#808080</color>
<color name="greySurface">#1e1e1e</color>
<color name="mapInfoLayout">#66000000</color>
<color name="mapInfoLayout">#99000000</color>
</resources>
+6 -5
View File
@@ -47,17 +47,18 @@
<string name="trans_link_lowHigh" translatable="false">%.4f - %.4f</string>
<string name="trans_no_data">No transceivers found for this satellite</string>
<string name="map_qth" translatable="false">QTH: %s</string>
<string name="map_qth">QTH Locator: %s</string>
<string name="map_coverage">Coverage: %.0f km</string>
<string name="map_copyright" translatable="false">Wikimedia maps | Map data © OpenStreetMap contributors</string>
<string name="pat_azimuth">Az: %.1f°</string>
<string name="pat_elevation">El: %.1f°</string>
<string name="pat_distance">Dst: %.0f km</string>
<string name="pat_altitude">Alt: %.0f km</string>
<string name="pat_distance">Range: %.0f km</string>
<string name="pat_altitude">Altitude: %.0f km</string>
<string name="pat_osm_idName" translatable="false">Id:%s / %s</string>
<string name="pat_osm_latLon">Lat: %.1f°, Lon: %.1f°</string>
<string name="pat_osm_vel">Vel: %.2f km/s</string>
<string name="pat_osm_lat">Latitude: %.1f°</string>
<string name="pat_osm_lon">Longitude: %.1f°</string>
<string name="pat_osm_vel">Velocity: %.2f km/s</string>
<string name="pref_gsp_title">Ground station position</string>
<string name="pref_pos_gps">Set position from GPS data</string>
+5
View File
@@ -48,4 +48,9 @@
<item name="android:includeFontPadding">false</item>
</style>
<style name="MapInfoText">
<item name="android:textSize">15sp</item>
<item name="android:textColor">@color/themeLight</item>
</style>
</resources>