Added pass preferences dialog. Pass prefs are stored in sharedPrefs.

This commit is contained in:
Arty Bishop committed 2019-11-24 17:57:58 +00:00
1 parent cc53847374
commit 0f5b734933
6 files changed
+119 -14

No files matched your search

+49
View File
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<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/pass_pref_root"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/pass_pref_tv_hours"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/pass_pref_tv_hours"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/pass_pref_et_hours"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/pass_pref_hint_hours"
android:importantForAutofill="no"
android:inputType="number"
app:layout_constraintEnd_toEndOf="@+id/pass_pref_tv_hours"
app:layout_constraintStart_toStartOf="@+id/pass_pref_tv_hours"
app:layout_constraintTop_toBottomOf="@+id/pass_pref_tv_hours" />
<TextView
android:id="@+id/pass_pref_tv_maxEl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/pass_pref_tv_maxEl"
app:layout_constraintEnd_toEndOf="@+id/pass_pref_et_hours"
app:layout_constraintStart_toStartOf="@+id/pass_pref_et_hours"
app:layout_constraintTop_toBottomOf="@+id/pass_pref_et_hours" />
<EditText
android:id="@+id/pass_pref_et_maxEl"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/pass_pref_hint_maxEl"
android:importantForAutofill="no"
android:inputType="number"
app:layout_constraintEnd_toEndOf="@+id/pass_pref_tv_maxEl"
app:layout_constraintStart_toStartOf="@+id/pass_pref_tv_maxEl"
app:layout_constraintTop_toBottomOf="@+id/pass_pref_tv_maxEl" />
</androidx.constraintlayout.widget.ConstraintLayout>
+13
View File
@@ -29,6 +29,19 @@
<string name="card_pass_aos_time">13:14:15</string>
<string name="card_pass_los_time">16:17:18</string>
<string name="btn_ok">OK</string>
<string name="btn_cancel">Cancel</string>
<string name="btn_clear">Clear All</string>
<string name="title_pass_pref">Passes preferences</string>
<string name="title_select_sat">Select satellites to track</string>
<string name="pass_pref_tv_hours">Show passes that occur within X hours</string>
<string name="pass_pref_hint_hours">Hours ahead</string>
<string name="pass_pref_tv_maxEl">Show passes with max elevation above</string>
<string name="pass_pref_hint_maxEl">Max elevation</string>
<string name="pattern_aos">AOS -%02d:%02d:%02d</string>
<string name="map_content">Nasa Map</string>
<string name="placeholder">Placeholder</string>
</resources>