Skip to content

Satellite tracker and pass predictor for Android, inspired by Gpredict

Colors, styles and resources cleanup

Arty Bishopb071131ba377
diff --git a/app/src/main/java/com/rtbishop/look4sat/ui/fragments/MapFragment.kt b/app/src/main/java/com/rtbishop/look4sat/ui/fragments/MapFragment.kt
index b7220222..74622017 100644
--- a/app/src/main/java/com/rtbishop/look4sat/ui/fragments/MapFragment.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/ui/fragments/MapFragment.kt
@@ -72,7 +72,7 @@ class MapFragment : Fragment(R.layout.fragment_map) {
footprintPaint = Paint().apply {
style = Paint.Style.FILL_AND_STROKE
- color = ContextCompat.getColor(mainActivity, R.color.satOsmTemp)
+ color = ContextCompat.getColor(mainActivity, R.color.satFootprint)
isAntiAlias = true
}
diff --git a/app/src/main/java/com/rtbishop/look4sat/ui/views/PolarView.kt b/app/src/main/java/com/rtbishop/look4sat/ui/views/PolarView.kt
index 09988a79..4f692a8f 100644
--- a/app/src/main/java/com/rtbishop/look4sat/ui/views/PolarView.kt
+++ b/app/src/main/java/com/rtbishop/look4sat/ui/views/PolarView.kt
@@ -29,7 +29,7 @@ class PolarView(context: Context) : View(context) {
private val radarPaint = Paint().apply {
isAntiAlias = true
- color = ContextCompat.getColor(context, R.color.themeLight)
+ color = ContextCompat.getColor(context, R.color.themePrimText)
style = Paint.Style.STROKE
strokeWidth = scale
}
diff --git a/app/src/main/res/color/nav_item_selector.xml b/app/src/main/res/color/nav_item_selector.xml
index 539f4f3b..9a61fd78 100644
--- a/app/src/main/res/color/nav_item_selector.xml
+++ b/app/src/main/res/color/nav_item_selector.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/themeAccent" android:state_selected="true" />
- <item android:color="@color/themeLight" />
+ <item android:color="@color/themePrimText" />
</selector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/entries_divider.xml b/app/src/main/res/drawable/entries_divider.xml
index f02d1393..b8f65133 100644
--- a/app/src/main/res/drawable/entries_divider.xml
+++ b/app/src/main/res/drawable/entries_divider.xml
@@ -7,7 +7,7 @@
<size
android:width="1dp"
android:height="0.5dp" />
- <solid android:color="@color/shuttle_gray" />
+ <solid android:color="@color/themeSecText" />
</shape>
</item>
</layer-list>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_fdroid_logo.xml b/app/src/main/res/drawable/ic_fdroid_logo.xml
new file mode 100644
index 00000000..3a910813
--- /dev/null
+++ b/app/src/main/res/drawable/ic_fdroid_logo.xml
@@ -0,0 +1,23 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ <path
+ android:fillColor="@color/themeAccent"
+ android:pathData="M8,20.0449C7.7923,20.0449 7.5902,20.0656 7.3945,20.1055C6.8076,20.225 6.2836,20.5152 5.877,20.9219C5.4703,21.3286 5.18,21.8506 5.0605,22.4375C5.0207,22.6331 5,22.8372 5,23.0449L5,30.0449L5,42.2754L5,43.0449C5,43.6682 5.1889,44.246 5.5117,44.7246C6.0498,45.5224 6.9612,46.0449 8,46.0449L40,46.0449C41.0387,46.0449 41.9502,45.5224 42.4883,44.7246C42.5959,44.5651 42.6899,44.3944 42.7656,44.2148C42.917,43.8557 43,43.4604 43,43.0449L43,42.2754L43,36.0449L43,23.8125L43,23.0449C43,22.6294 42.917,22.2342 42.7656,21.875C42.6899,21.6954 42.5959,21.5248 42.4883,21.3652C41.9502,20.5675 41.0387,20.0449 40,20.0449L8,20.0449zM24,22.5254A10.5182,10.5182 0,0 1,34.5176 33.0449A10.5182,10.5182 0,0 1,24 43.5625A10.5182,10.5182 0,0 1,13.4824 33.0449A10.5182,10.5182 0,0 1,24 22.5254zM24,24.4492A8.5958,8.5958 0,0 0,15.4043 33.0449A8.5958,8.5958 0,0 0,24 41.6406A8.5958,8.5958 0,0 0,32.5957 33.0449A8.5958,8.5958 0,0 0,24 24.4492zM24,26.75C27.434,26.75 30.25,29.566 30.25,33C30.25,36.434 27.434,39.25 24,39.25C21.0479,39.25 18.5583,37.1661 17.916,34.4004L21.0703,34.4004C21.5888,35.4973 22.6926,36.25 24,36.25C25.8127,36.25 27.25,34.8127 27.25,33C27.25,31.1873 25.8127,29.75 24,29.75C22.7748,29.75 21.734,30.415 21.1797,31.4004L17.9668,31.4004C18.6802,28.7347 21.1193,26.75 24,26.75z"
+ android:strokeWidth="2"
+ android:strokeColor="#00000000"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="miter"
+ tools:ignore="VectorPath" />
+ <path
+ android:fillColor="@color/themeAccent"
+ android:pathData="M2.3379,1.5254C1.8997,1.5254 1.378,1.6672 1.5137,2.3242C1.6007,2.7458 4.4144,6.2239 5.4434,7.4902C5.2677,7.7794 5.1304,8.0942 5.0605,8.4375C5.0207,8.6331 5,8.8372 5,9.0449L5,9.582L5,12.0449L5,13.0449L5,15.5059L5,16.0449C5,16.6682 5.1889,17.246 5.5117,17.7246C6.0498,18.5224 6.9612,19.0449 8,19.0449L40,19.0449C41.0387,19.0449 41.9502,18.5224 42.4883,17.7246C42.5959,17.5651 42.6899,17.3944 42.7656,17.2148C42.8413,17.0353 42.8996,16.846 42.9395,16.6504C42.9793,16.4547 43,16.2527 43,16.0449L43,15.5059L43,13.0449L43,12.0449L43,9.582L43,9.0449C43,8.8372 42.9793,8.6331 42.9395,8.4375C42.8696,8.0942 42.7323,7.7794 42.5566,7.4902C43.5856,6.2239 46.3993,2.7458 46.4863,2.3242C46.622,1.6672 46.1003,1.5254 45.6621,1.5254C45.1945,1.5396 44.8462,1.9932 44.5859,2.2832L41.3984,6.4023C40.9796,6.1808 40.5086,6.0449 40,6.0449L8,6.0449C7.7923,6.0449 7.5902,6.0656 7.3945,6.1055C7.1989,6.1453 7.0097,6.2036 6.8301,6.2793C6.7496,6.3132 6.6782,6.3618 6.6016,6.4023L3.4141,2.2832C3.1538,1.9932 2.8055,1.5396 2.3379,1.5254zM14.375,9.75A3.375,3.375 0,0 1,17.75 13.125A3.375,3.375 0,0 1,14.375 16.5A3.375,3.375 0,0 1,11 13.125A3.375,3.375 0,0 1,14.375 9.75zM33.875,9.75A3.375,3.375 0,0 1,37.25 13.125A3.375,3.375 0,0 1,33.875 16.5A3.375,3.375 0,0 1,30.5 13.125A3.375,3.375 0,0 1,33.875 9.75z"
+ android:strokeWidth="2"
+ android:strokeColor="#00000000"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="miter"
+ tools:ignore="VectorPath" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
index c8f4bdbe..23d3d482 100644
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -20,8 +20,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
- android:angle="270"
- android:endColor="@color/themeDark"
- android:startColor="@color/backgroundDark"
- android:type="linear" />
+ android:endColor="@color/darkBackground"
+ android:startColor="@color/darkBackground" />
</shape>
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
index 54472524..ead50a59 100644
--- a/app/src/main/res/drawable/ic_launcher_foreground.xml
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -30,10 +30,10 @@
android:translateX="70.26573"
android:translateY="70.26573">
<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" />
</group>
diff --git a/app/src/main/res/drawable/ic_prefs.xml b/app/src/main/res/drawable/ic_prefs.xml
deleted file mode 100644
index 58652c58..00000000
--- a/app/src/main/res/drawable/ic_prefs.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<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>
diff --git a/app/src/main/res/layout/fragment_entries.xml b/app/src/main/res/layout/fragment_entries.xml
index abfbc89f..c880d509 100644
--- a/app/src/main/res/layout/fragment_entries.xml
+++ b/app/src/main/res/layout/fragment_entries.xml
@@ -50,7 +50,7 @@
android:id="@+id/import_web"
android:layout_width="64dp"
android:layout_height="48dp"
- android:backgroundTint="@color/backgroundDark"
+ android:backgroundTint="@color/darkBackground"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_update_web"
app:layout_constraintBottom_toBottomOf="@+id/import_file"
@@ -62,7 +62,7 @@
android:layout_width="64dp"
android:layout_height="48dp"
android:layout_marginEnd="4dp"
- android:backgroundTint="@color/backgroundDark"
+ android:backgroundTint="@color/darkBackground"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_update_file"
app:layout_constraintEnd_toEndOf="parent"
diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml
index d39a9b7a..c24e25a0 100644
--- a/app/src/main/res/layout/fragment_map.xml
+++ b/app/src/main/res/layout/fragment_map.xml
@@ -35,7 +35,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/backgroundMapInfoLayout"
+ android:background="@color/mapInfoLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
diff --git a/app/src/main/res/layout/fragment_passes.xml b/app/src/main/res/layout/fragment_passes.xml
index 6567341b..5f7f2bba 100644
--- a/app/src/main/res/layout/fragment_passes.xml
+++ b/app/src/main/res/layout/fragment_passes.xml
@@ -53,6 +53,8 @@
android:id="@+id/passes_recycler"
android:layout_width="0dp"
android:layout_height="0dp"
+ android:layout_marginTop="2dp"
+ android:layout_marginBottom="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
diff --git a/app/src/main/res/layout/item_sat_entry.xml b/app/src/main/res/layout/item_sat_entry.xml
index ff3a7c36..2daebcec 100644
--- a/app/src/main/res/layout/item_sat_entry.xml
+++ b/app/src/main/res/layout/item_sat_entry.xml
@@ -27,5 +27,5 @@
android:paddingStart="24dp"
android:paddingEnd="20dp"
android:text="@string/placeholder"
- android:textColor="@color/themeLight"
+ android:textColor="@color/themePrimText"
android:textSize="17sp" />
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 30768b20..6ed79b6c 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -18,22 +18,17 @@
-->
<resources>
+ <!-- main colors -->
<color name="themeAccent">#FFE082</color>
- <color name="themeLight">#C0C0C0</color>
+ <color name="themePrimText">#E8E8E8</color>
+ <color name="themeSecText">#808080</color>
+ <!-- background colors -->
+ <color name="primBackground">#282828</color>
+ <color name="secBackground">#242424</color>
<color name="themeDark">#191919</color>
- <color name="themeIcon">#FFE082</color>
- <color name="themeButton">#242424</color>
- <color name="backgroundDark">#121212</color>
- <color name="backgroundMapText">#CC000000</color>
- <color name="backgroundMapInfoLayout">#66000000</color>
- <color name="satTrack">#D50000</color>
- <color name="satPrimary">#FFE082</color>
- <color name="satSecondary">#80FFE082</color>
- <color name="satOsmTemp">#26FFE082</color>
- <!-- temp colors -->
- <color name="shark">#202124</color>
- <color name="shark_light">#2E2F32</color>
- <color name="athens_gray">#e8e9ec</color>
- <color name="shuttle_gray">#606367</color>
- <color name="mako">#3d4043</color>
+ <color name="darkBackground">#121212</color>
+ <color name="mapInfoLayout">#66000000</color>
+ <!-- satellite colors -->
+ <color name="satTrack">#CE2029</color>
+ <color name="satFootprint">#26FFE082</color>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index c5c66e60..d7ef4e76 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -19,17 +19,15 @@
<resources>
- <style name="AppTheme" parent="Theme.MaterialComponents">
+ <style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar">
<item name="colorPrimary">@color/themeAccent</item>
<item name="colorSecondary">@color/themeAccent</item>
- <item name="colorSurface">@color/backgroundDark</item>
+ <item name="colorSurface">@color/darkBackground</item>
- <item name="colorOnPrimary">@color/backgroundDark</item>
- <item name="colorOnSecondary">@color/backgroundDark</item>
- <item name="colorOnSurface">@color/themeLight</item>
+ <item name="colorOnPrimary">@color/darkBackground</item>
+ <item name="colorOnSecondary">@color/darkBackground</item>
+ <item name="colorOnSurface">@color/themePrimText</item>
- <item name="windowActionBar">false</item>
- <item name="windowNoTitle">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
@@ -49,14 +47,14 @@
<style name="PolarViewText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textColor">@color/themePrimText</item>
<item name="android:textSize">15sp</item>
</style>
<style name="CardTransText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textColor">@color/themePrimText</item>
<item name="android:textSize">15sp</item>
</style>
@@ -96,14 +94,14 @@
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
- <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textColor">@color/themePrimText</item>
<item name="android:textSize">16sp</item>
</style>
<style name="AboutRegular">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textColor">@color/themePrimText</item>
<item name="android:textSize">15sp</item>
</style>