mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-04 03:47:24 +00:00
Restored manual location input functionality #40
This commit is contained in:
1 parent
9d6dbc8d31
commit
ffd1fc1551
10 files changed
+196
-10
No files matched your search
@@ -59,30 +59,41 @@
|
||||
style="@style/NormalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:drawableStart="@drawable/ic_gps"
|
||||
android:text="@string/location_gps"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_btn_qth"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_btn_manual"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_lat" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_btn_manual"
|
||||
style="@style/NormalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_gps"
|
||||
android:text="Manual"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/location_btn_gps"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_btn_qth"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/location_btn_gps" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_btn_qth"
|
||||
style="@style/NormalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:drawableStart="@drawable/ic_qth"
|
||||
android:text="@string/location_qth"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/location_btn_gps"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/location_btn_gps" />
|
||||
app:layout_constraintStart_toEndOf="@+id/location_btn_manual" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
style="@style/SurfaceCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/location_title"
|
||||
style="@style/DialogTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:minHeight="48dp"
|
||||
android:text="@string/dialog_filter_passes"
|
||||
app:layout_constraintBottom_toTopOf="@+id/location_lat_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/location_pos_btn"
|
||||
app:layout_constraintStart_toStartOf="@+id/location_neg_btn"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/location_lat_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:hint="@string/pref_hours_ahead_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number"
|
||||
android:minHeight="48dp"
|
||||
app:endIconMode="clear_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/location_lon_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/location_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/location_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_title">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/location_lat_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textUri" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/location_lon_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint="@string/pref_min_el_hint"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="number|numberDecimal"
|
||||
android:minHeight="48dp"
|
||||
app:endIconMode="clear_text"
|
||||
app:layout_constraintBottom_toTopOf="@+id/location_neg_btn"
|
||||
app:layout_constraintEnd_toEndOf="@+id/location_lat_layout"
|
||||
app:layout_constraintStart_toStartOf="@+id/location_lat_layout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_lat_layout">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/location_lon_edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textUri" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_neg_btn"
|
||||
style="@style/NormalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/btn_cancel"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/location_pos_btn"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/location_lon_layout" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/location_pos_btn"
|
||||
style="@style/NormalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/btn_accept"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/location_neg_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/location_neg_btn" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -53,6 +53,9 @@
|
||||
<action
|
||||
android:id="@+id/action_prefs_to_sources"
|
||||
app:destination="@id/nav_sources" />
|
||||
<action
|
||||
android:id="@+id/action_prefs_to_location"
|
||||
app:destination="@id/nav_location" />
|
||||
<action
|
||||
android:id="@+id/action_prefs_to_locator"
|
||||
app:destination="@id/nav_locator" />
|
||||
@@ -65,6 +68,10 @@
|
||||
android:id="@+id/nav_modes"
|
||||
android:name="com.rtbishop.look4sat.presentation.entriesScreen.ModesDialog"
|
||||
tools:layout="@layout/dialog_modes" />
|
||||
<dialog
|
||||
android:id="@+id/nav_location"
|
||||
android:name="com.rtbishop.look4sat.presentation.settingsScreen.LocationDialog"
|
||||
tools:layout="@layout/dialog_location" />
|
||||
<dialog
|
||||
android:id="@+id/nav_locator"
|
||||
android:name="com.rtbishop.look4sat.presentation.settingsScreen.LocatorDialog"
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<string name="pref_gsp_title">Местоположение наземной станции</string>
|
||||
<string name="pref_pos_gps">Установить позицию по данным GPS</string>
|
||||
<string name="pref_pos_gps_null">Нет данных геолокации</string>
|
||||
<string name="pref_pos_manual_error">Введены неверные данные</string>
|
||||
<string name="pref_pos_gps_error">Нет разрешения использовать геоданные</string>
|
||||
<string name="pref_pos_qth">Установить позицию по локатору QTH</string>
|
||||
<string name="pref_pos_qth_error">Неправильный локатор QTH</string>
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<string name="pref_gsp_title">Ground station position</string>
|
||||
<string name="pref_pos_gps">Set position from GPS data</string>
|
||||
<string name="pref_pos_gps_null">No geolocation data</string>
|
||||
<string name="pref_pos_manual_error">Invalid location entered</string>
|
||||
<string name="pref_pos_gps_error">Check your location permissions</string>
|
||||
<string name="pref_pos_qth">Set position from QTH locator</string>
|
||||
<string name="pref_pos_qth_error">Invalid QTH locator</string>
|
||||
|
||||
Reference in new issue
Block a user