Restored manual location input functionality #40

This commit is contained in:
Arty Bishop committed 2022-02-19 12:13:01 +00:00
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>
+102
View File
@@ -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>