mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-05 04:07:29 +00:00
Added PassesPrefsDialog.kt with extra, will cleanup later
This commit is contained in:
1 parent
be26b3e1dc
commit
f58f851151
15 files changed
+349
-66
No files matched your search
@@ -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="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,14 @@
|
||||
<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="128"
|
||||
android:viewportHeight="128">
|
||||
<path
|
||||
android:fillColor="@color/greyDark"
|
||||
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="@color/greyDark"
|
||||
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>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/greyDark">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pass_pref_title"
|
||||
style="@style/DialogText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/dialog_filter_passes"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hours_ahead_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/pref_hours_ahead_summary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/pass_pref_title" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hours_ahead_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/pref_hours_ahead_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number"
|
||||
android:minHeight="48dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/hours_ahead_text"
|
||||
app:layout_constraintStart_toStartOf="@+id/hours_ahead_text"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hours_ahead_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/min_elev_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/pref_min_el_summary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/hours_ahead_edit"
|
||||
app:layout_constraintStart_toStartOf="@+id/hours_ahead_edit"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hours_ahead_edit" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/min_elev_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/pref_min_el_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number|numberDecimal"
|
||||
android:minHeight="48dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/min_elev_text"
|
||||
app:layout_constraintStart_toStartOf="@+id/min_elev_text"
|
||||
app:layout_constraintTop_toBottomOf="@+id/min_elev_text" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/pass_pref_btn_neg"
|
||||
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/greySurface"
|
||||
android:text="@string/btn_cancel"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/pass_pref_btn_pos"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/min_elev_edit" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/pass_pref_btn_pos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:text="@string/btn_update"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/pass_pref_btn_neg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/pass_pref_btn_neg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -28,13 +28,14 @@
|
||||
<ImageButton
|
||||
android:id="@+id/passes_refresh"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:backgroundTint="@color/greyDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/ic_refresh"
|
||||
app:layout_constraintEnd_toEndOf="@+id/passes_bar"
|
||||
android:src="@drawable/ic_filter"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/passes_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/passes_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/passes_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/greySurface"
|
||||
app:navigationIcon="?attr/homeAsUpIndicator">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passes_timer"
|
||||
style="@style/TimerText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/timer_zero"
|
||||
android:textSize="42sp" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/passes_swipe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/passes_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="2dp" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/passes_error"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/passes_error"
|
||||
android:textSize="20sp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/passes_fab"
|
||||
style="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:src="@drawable/ic_sputnik_dark" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -10,18 +10,10 @@
|
||||
tools:layout="@layout/fragment_entries">
|
||||
<action
|
||||
android:id="@+id/action_entries_to_passes"
|
||||
app:destination="@id/nav_passes"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
app:destination="@id/nav_passes" />
|
||||
<action
|
||||
android:id="@+id/action_entries_to_sources"
|
||||
app:destination="@id/nav_sources"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
app:destination="@id/nav_sources" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/nav_passes"
|
||||
@@ -29,11 +21,7 @@
|
||||
tools:layout="@layout/fragment_passes">
|
||||
<action
|
||||
android:id="@+id/action_passes_to_radar"
|
||||
app:destination="@id/nav_radar"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
app:destination="@id/nav_radar" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/nav_radar"
|
||||
@@ -42,19 +30,11 @@
|
||||
<action
|
||||
android:id="@+id/action_radar_to_passes"
|
||||
app:destination="@id/nav_passes"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/nav_passes"
|
||||
app:popUpToInclusive="true" />
|
||||
<action
|
||||
android:id="@+id/action_radar_to_map"
|
||||
app:destination="@id/nav_map"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
app:destination="@id/nav_map" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/nav_map"
|
||||
@@ -66,12 +46,12 @@
|
||||
tools:layout="@layout/fragment_prefs">
|
||||
<action
|
||||
android:id="@+id/action_prefs_to_sources"
|
||||
app:destination="@id/nav_sources"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
app:destination="@id/nav_sources" />
|
||||
</fragment>
|
||||
<dialog
|
||||
android:id="@+id/nav_pass_prefs"
|
||||
android:name="com.rtbishop.look4sat.presentation.passesScreen.PassesPrefsDialog"
|
||||
tools:layout="@layout/dialog_passes" />
|
||||
<dialog
|
||||
android:id="@+id/nav_sources"
|
||||
android:name="com.rtbishop.look4sat.presentation.sourcesScreen.SourcesDialog"
|
||||
|
||||
@@ -62,6 +62,15 @@
|
||||
<string name="pref_radar_sweep">Показывать анимацию радара</string>
|
||||
<string name="pref_time_utc_title">Показывать время пролета по UTC</string>
|
||||
|
||||
<string name="dialog_filter_passes">Фильтровать пролеты</string>
|
||||
|
||||
<string name="pref_hours_ahead_hint">Количество часов</string>
|
||||
<string name="pref_hours_ahead_summary">Показать пролеты за след. Х часов</string>
|
||||
<string name="pref_hours_ahead_input_error">Введите значение между 1ч и 168ч</string>
|
||||
<string name="pref_min_el_hint">Минимальная элевация</string>
|
||||
<string name="pref_min_el_summary">Показать пролеты с элевацией более</string>
|
||||
<string name="pref_min_el_input_error">Введите значение между 0° и 90°</string>
|
||||
|
||||
<string name="about_version">Версия: %s</string>
|
||||
<string name="about_subtitle">Трекер спутников для Android</string>
|
||||
<string name="about_support">Поддержать</string>
|
||||
|
||||
@@ -84,6 +84,17 @@
|
||||
<string name="pref_radar_sweep">Enable radar sweep animation</string>
|
||||
<string name="pref_compass_title">Use sensors to rotate radar view</string>
|
||||
|
||||
<string name="dialog_filter_passes">Filter passes</string>
|
||||
|
||||
<string name="pref_hours_ahead_key" translatable="false">hoursAhead</string>
|
||||
<string name="pref_hours_ahead_hint">Hours ahead</string>
|
||||
<string name="pref_hours_ahead_summary">Show passes that occur within X hours</string>
|
||||
<string name="pref_hours_ahead_input_error">Set the value between 1h and 168h</string>
|
||||
<string name="pref_min_el_key" translatable="false">minEl</string>
|
||||
<string name="pref_min_el_hint">Minimum elevation</string>
|
||||
<string name="pref_min_el_summary">Show passes with max elevation above</string>
|
||||
<string name="pref_min_el_input_error">Set the value between 0° and 90°</string>
|
||||
|
||||
<string name="about_version">Version: %s</string>
|
||||
<string name="about_subtitle">Satellite tracker and pass predictor</string>
|
||||
<string name="about_github" translatable="false">GitHub</string>
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<item name="cardCornerRadius">0dp</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">17sp</item>
|
||||
</style>
|
||||
|
||||
<style name="InfoButton">
|
||||
<item name="android:backgroundTint">@color/bgDark</item>
|
||||
<item name="android:textColor">@color/themeLight</item>
|
||||
|
||||
Reference in new issue
Block a user