Skip to content

Satellite tracker and pass predictor for Android, inspired by Gpredict

Minor visual changes to dialogs and settings

Arty Bishop82032109ddeb
diff --git a/app/src/main/res/layout/card_prefs_location.xml b/app/src/main/res/layout/card_prefs_location.xml
index 351d7bbb..aa03660b 100644
--- a/app/src/main/res/layout/card_prefs_location.xml
+++ b/app/src/main/res/layout/card_prefs_location.xml
@@ -6,7 +6,7 @@
<TextView
android:id="@+id/location_title"
- style="@style/SettingsCategory"
+ style="@style/SettingsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/layout/card_prefs_other.xml b/app/src/main/res/layout/card_prefs_other.xml
index 694059de..f5a01bb9 100644
--- a/app/src/main/res/layout/card_prefs_other.xml
+++ b/app/src/main/res/layout/card_prefs_other.xml
@@ -6,7 +6,7 @@
<TextView
android:id="@+id/other_title"
- style="@style/SettingsCategory"
+ style="@style/SettingsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/layout/card_prefs_tracking.xml b/app/src/main/res/layout/card_prefs_tracking.xml
index 1ad6e53a..ef111af9 100644
--- a/app/src/main/res/layout/card_prefs_tracking.xml
+++ b/app/src/main/res/layout/card_prefs_tracking.xml
@@ -6,7 +6,7 @@
<TextView
android:id="@+id/tracking_title"
- style="@style/SettingsCategory"
+ style="@style/SettingsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/layout/card_prefs_update.xml b/app/src/main/res/layout/card_prefs_update.xml
index e236e890..1008a47c 100644
--- a/app/src/main/res/layout/card_prefs_update.xml
+++ b/app/src/main/res/layout/card_prefs_update.xml
@@ -6,7 +6,7 @@
<TextView
android:id="@+id/update_title"
- style="@style/SettingsCategory"
+ style="@style/SettingsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/layout/card_prefs_warranty.xml b/app/src/main/res/layout/card_prefs_warranty.xml
index fba73460..604fb2a2 100644
--- a/app/src/main/res/layout/card_prefs_warranty.xml
+++ b/app/src/main/res/layout/card_prefs_warranty.xml
@@ -6,7 +6,7 @@
<TextView
android:id="@+id/warranty_title"
- style="@style/SettingsCategory"
+ style="@style/SettingsTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
diff --git a/app/src/main/res/layout/dialog_passes.xml b/app/src/main/res/layout/dialog_passes.xml
index dc6b1b3f..d160c712 100644
--- a/app/src/main/res/layout/dialog_passes.xml
+++ b/app/src/main/res/layout/dialog_passes.xml
@@ -3,11 +3,11 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/surfaceBg">
+ android:background="@color/surfaceCard">
<TextView
android:id="@+id/pass_pref_title"
- style="@style/DialogText"
+ style="@style/DialogTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
@@ -18,6 +18,7 @@
<TextView
android:id="@+id/hours_ahead_text"
+ style="@style/DialogText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
@@ -42,6 +43,7 @@
<TextView
android:id="@+id/min_elev_text"
+ style="@style/DialogText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
@@ -64,15 +66,13 @@
<Button
android:id="@+id/pass_pref_btn_neg"
+ style="@style/DialogButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="16dp"
- android:backgroundTint="@color/surfaceToolbar"
android:text="@string/btn_cancel"
- android:textAllCaps="false"
- android:textColor="@color/themeAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pass_pref_btn_pos"
app:layout_constraintHorizontal_bias="0.5"
@@ -82,13 +82,11 @@
<Button
android:id="@+id/pass_pref_btn_pos"
+ style="@style/DialogButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
- android:backgroundTint="@color/surfaceToolbar"
android:text="@string/btn_accept"
- android:textAllCaps="false"
- android:textColor="@color/themeAccent"
app:layout_constraintBaseline_toBaselineOf="@+id/pass_pref_btn_neg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
diff --git a/app/src/main/res/layout/dialog_sources.xml b/app/src/main/res/layout/dialog_sources.xml
index 71355285..a8cc2ec2 100644
--- a/app/src/main/res/layout/dialog_sources.xml
+++ b/app/src/main/res/layout/dialog_sources.xml
@@ -4,29 +4,28 @@
android:id="@+id/sources_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/surfaceBg"
- android:padding="4dp">
+ android:background="@color/surfaceCard">
<TextView
android:id="@+id/sources_title"
+ style="@style/DialogTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="6dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
android:text="@string/sources_title"
- android:textSize="16sp"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/sources_warning"
+ style="@style/DialogTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center"
android:text="@string/sources_https"
- android:textSize="16sp"
app:layout_constraintStart_toStartOf="@+id/sources_title"
app:layout_constraintTop_toBottomOf="@+id/sources_title" />
@@ -34,8 +33,9 @@
android:id="@+id/sources_btn_add"
android:layout_width="48dp"
android:layout_height="48dp"
- android:backgroundTint="@color/surfaceToolbar"
+ android:backgroundTint="@color/surfaceButton"
android:src="@drawable/ic_add"
+ android:tint="@color/themeAccent"
app:layout_constraintBottom_toBottomOf="@+id/sources_warning"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintEnd_toEndOf="@+id/sources_recycler"
@@ -44,10 +44,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sources_recycler"
android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="8dp"
+ android:layout_height="280dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sources_warning">
@@ -56,30 +56,26 @@
<Button
android:id="@+id/sources_btn_neg"
+ style="@style/DialogButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="4dp"
- android:backgroundTint="@color/surfaceToolbar"
+ android:layout_marginStart="12dp"
android:text="@string/btn_cancel"
- android:textAllCaps="false"
- android:textColor="@color/themeAccent"
app:layout_constraintBaseline_toBaselineOf="@+id/sources_btn_pos"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/sources_btn_pos"
+ style="@style/DialogButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:layout_marginEnd="4dp"
- android:layout_marginBottom="4dp"
- android:backgroundTint="@color/surfaceToolbar"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="12dp"
+ android:layout_marginBottom="12dp"
android:text="@string/btn_accept"
- android:textAllCaps="false"
- android:textColor="@color/themeAccent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sources_recycler" />
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_entries.xml b/app/src/main/res/layout/fragment_entries.xml
index d37d1888..0d7b8a63 100644
--- a/app/src/main/res/layout/fragment_entries.xml
+++ b/app/src/main/res/layout/fragment_entries.xml
@@ -75,7 +75,7 @@
<Button
android:id="@+id/entries_cancel"
- style="@style/AppButton"
+ style="@style/DialogButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
@@ -89,7 +89,7 @@
<Button
android:id="@+id/entries_select_all"
- style="@style/AppButton"
+ style="@style/DialogButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/entries_select_all"
@@ -100,7 +100,7 @@
<Button
android:id="@+id/entries_accept"
- style="@style/AppButton"
+ style="@style/DialogButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml
index f12e9d2e..3bdf80de 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -1,120 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<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="wrap_content"
- android:scrollbars="none">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <androidx.cardview.widget.CardView
- android:id="@+id/prefs_toolbar"
- style="@style/Toolbar"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
- <ImageButton
- android:id="@+id/prefs_back"
- style="@style/ToolbarButton"
- android:layout_marginStart="4dp"
- android:src="@drawable/ic_back"
- app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
-
- <TextView
- android:id="@+id/prefs_title"
- style="@style/ToolbarText"
- android:text="@string/settings_title"
- app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
- app:layout_constraintEnd_toEndOf="@+id/prefs_toolbar"
- app:layout_constraintHorizontal_bias="0.25"
- app:layout_constraintStart_toStartOf="@+id/prefs_toolbar"
- app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_info"
- style="@style/SettingsCard"
- android:layout_marginTop="8dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/prefs_toolbar">
-
- <include
- android:id="@+id/prefs_info"
- layout="@layout/card_prefs_about" />
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_location"
- style="@style/SettingsCard"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_info">
-
- <include
- android:id="@+id/prefs_location"
- layout="@layout/card_prefs_location" />
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_data"
- style="@style/SettingsCard"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_location">
-
- <include
- android:id="@+id/prefs_data"
- layout="@layout/card_prefs_update" />
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_tracking"
- style="@style/SettingsCard"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_data">
-
- <include
- android:id="@+id/prefs_tracking"
- layout="@layout/card_prefs_tracking" />
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_other"
- style="@style/SettingsCard"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_tracking">
-
- <include
- android:id="@+id/prefs_other"
- layout="@layout/card_prefs_other" />
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
- android:id="@+id/card_prefs_warranty"
- style="@style/SettingsCard"
- android:layout_marginBottom="8dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/card_prefs_other">
-
- <include
- android:id="@+id/prefs_warranty"
- layout="@layout/card_prefs_warranty" />
-
- </androidx.cardview.widget.CardView>
-
- </androidx.constraintlayout.widget.ConstraintLayout>
-</ScrollView>
\ No newline at end of file
+ android:layout_height="match_parent">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/prefs_toolbar"
+ style="@style/Toolbar"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <ImageButton
+ android:id="@+id/prefs_back"
+ style="@style/ToolbarButton"
+ android:layout_marginStart="4dp"
+ android:src="@drawable/ic_back"
+ app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
+
+ <TextView
+ android:id="@+id/prefs_title"
+ style="@style/ToolbarText"
+ android:text="@string/settings_title"
+ app:layout_constraintBottom_toBottomOf="@+id/prefs_toolbar"
+ app:layout_constraintEnd_toEndOf="@+id/prefs_toolbar"
+ app:layout_constraintHorizontal_bias="0.25"
+ app:layout_constraintStart_toStartOf="@+id/prefs_toolbar"
+ app:layout_constraintTop_toTopOf="@+id/prefs_toolbar" />
+
+ <ScrollView
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:scrollbars="none"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/prefs_toolbar">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_info"
+ style="@style/SettingsCard"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <include
+ android:id="@+id/prefs_info"
+ layout="@layout/card_prefs_about" />
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_location"
+ style="@style/SettingsCard"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_prefs_info">
+
+ <include
+ android:id="@+id/prefs_location"
+ layout="@layout/card_prefs_location" />
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_data"
+ style="@style/SettingsCard"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_prefs_location">
+
+ <include
+ android:id="@+id/prefs_data"
+ layout="@layout/card_prefs_update" />
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_tracking"
+ style="@style/SettingsCard"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_prefs_data">
+
+ <include
+ android:id="@+id/prefs_tracking"
+ layout="@layout/card_prefs_tracking" />
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_other"
+ style="@style/SettingsCard"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_prefs_tracking">
+
+ <include
+ android:id="@+id/prefs_other"
+ layout="@layout/card_prefs_other" />
+
+ </androidx.cardview.widget.CardView>
+
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_prefs_warranty"
+ style="@style/SettingsCard"
+ android:layout_marginBottom="8dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/card_prefs_other">
+
+ <include
+ android:id="@+id/prefs_warranty"
+ layout="@layout/card_prefs_warranty" />
+
+ </androidx.cardview.widget.CardView>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+ </ScrollView>
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 2ec55167..addce1a7 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -28,11 +28,27 @@
<item name="android:textSize">16sp</item>
</style>
+ <style name="DialogButton">
+ <item name="android:backgroundTint">@color/surfaceButton</item>
+ <item name="android:ellipsize">end</item>
+ <item name="android:maxLines">1</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:textColor">@color/themeAccent</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
<style name="DialogText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textColor">@color/themeLight</item>
+ <item name="android:textSize">16sp</item>
+ </style>
+
+ <style name="DialogTitle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/themeAccent</item>
- <item name="android:textSize">17sp</item>
+ <item name="android:textSize">16sp</item>
</style>
<style name="Toolbar">
@@ -91,7 +107,7 @@
<item name="android:textColor">@color/themeLight</item>
</style>
- <style name="SettingsCategory">
+ <style name="SettingsTitle">
<item name="android:includeFontPadding">false</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/themeAccent</item>