Reverted TLE source update screen, fixed location setting bug #53 #54

This commit is contained in:
Arty Bishop committed 2021-05-18 10:24:26 +01:00
1 parent fb2008b07a
commit a0a95ce372
26 files changed
+404 -78

No files matched your search

@@ -1,9 +0,0 @@
<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="M19,8l-4,4h3c0,3.31 -2.69,6 -6,6 -1.01,0 -1.97,-0.25 -2.8,-0.7l-1.46,1.46C8.97,19.54 10.43,20 12,20c4.42,0 8,-3.58 8,-8h3l-4,-4zM6,12c0,-3.31 2.69,-6 6,-6 1.01,0 1.97,0.25 2.8,0.7l1.46,-1.46C15.03,4.46 13.57,4 12,4c-4.42,0 -8,3.58 -8,8H1l4,4 4,-4H6z" />
</vector>
@@ -1,9 +0,0 @@
<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="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z" />
</vector>
@@ -1,9 +0,0 @@
<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="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z" />
</vector>
-9
View File
@@ -1,9 +0,0 @@
<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="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" />
</vector>
+1 -1
View File
@@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:fillColor="@color/themeLight"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
android:pathData="M19,8l-4,4h3c0,3.31 -2.69,6 -6,6 -1.01,0 -1.97,-0.25 -2.8,-0.7l-1.46,1.46C8.97,19.54 10.43,20 12,20c4.42,0 8,-3.58 8,-8h3l-4,-4zM6,12c0,-3.31 2.69,-6 6,-6 1.01,0 1.97,0.25 2.8,0.7l1.46,-1.46C15.03,4.46 13.57,4 12,4c-4.42,0 -8,3.58 -8,8H1l4,4 4,-4H6z" />
</vector>
@@ -0,0 +1,83 @@
<?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/tleSourcesDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/greyDark"
android:padding="4dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sourcesTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/sources_title"
android:textSize="16sp"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="@+id/sourcesRecycler"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sourcesWarning"
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/sourcesRecycler"
app:layout_constraintTop_toBottomOf="@+id/sourcesTitle" />
<ImageButton
android:id="@+id/sourceBtnAdd"
android:layout_width="48dp"
android:layout_height="48dp"
android:backgroundTint="@color/greySurface"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_add"
app:layout_constraintBottom_toBottomOf="@+id/sourcesWarning"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintEnd_toEndOf="@+id/sourcesRecycler"
app:layout_constraintTop_toTopOf="@+id/sourcesTitle" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sourcesRecycler"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sourcesWarning">
</androidx.recyclerview.widget.RecyclerView>
<com.google.android.material.button.MaterialButton
android:id="@+id/sourcesBtnNeg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/greySurface"
android:text="@string/btn_cancel"
android:textAllCaps="false"
android:textColor="@color/themeLight"
app:layout_constraintBaseline_toBaselineOf="@+id/sourcesBtnPos"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="@+id/sourcesRecycler" />
<com.google.android.material.button.MaterialButton
android:id="@+id/sourcesBtnPos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:backgroundTint="@color/greySurface"
android:text="@string/btn_update"
android:textAllCaps="false"
android:textColor="@color/themeLight"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/sourcesRecycler"
app:layout_constraintTop_toBottomOf="@+id/sourcesRecycler" />
</androidx.constraintlayout.widget.ConstraintLayout>
+1 -13
View File
@@ -30,19 +30,7 @@
android:backgroundTint="@color/greyDark"
android:contentDescription="@string/placeholder"
android:elevation="4dp"
android:src="@drawable/ic_baseline_cached_24"
app:layout_constraintBottom_toBottomOf="@+id/import_file"
app:layout_constraintEnd_toStartOf="@+id/import_source"
app:layout_constraintTop_toTopOf="@+id/import_file" />
<ImageButton
android:id="@+id/import_source"
android:layout_width="64dp"
android:layout_height="48dp"
android:backgroundTint="@color/greyDark"
android:contentDescription="@string/placeholder"
android:elevation="4dp"
android:src="@drawable/ic_baseline_link_24"
android:src="@drawable/ic_update_web"
app:layout_constraintBottom_toBottomOf="@+id/import_file"
app:layout_constraintEnd_toStartOf="@+id/import_file"
app:layout_constraintTop_toTopOf="@+id/import_file" />
@@ -0,0 +1,31 @@
<?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/tleSourceItem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingBottom="4dp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tleSourceInputLayout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/sources_hint"
app:endIconDrawable="@drawable/ic_map_sat"
app:endIconMode="custom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tleSourceUrl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textUri" />
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+11
View File
@@ -16,6 +16,13 @@
app:exitAnim="@anim/nav_default_exit_anim"
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
<action
android:id="@+id/action_entries_to_sources"
app:destination="@id/nav_dialog_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" />
</fragment>
<fragment
@@ -59,5 +66,9 @@
android:id="@+id/nav_info"
android:name="com.rtbishop.look4sat.presentation.appInfoScreen.AppInfoFragment"
tools:layout="@layout/fragment_info" />
<dialog
android:id="@+id/nav_dialog_sources"
android:name="com.rtbishop.look4sat.presentation.satSourcesScreen.SourcesDialog"
tools:layout="@layout/dialog_sources" />
</navigation>
+4 -1
View File
@@ -2,6 +2,8 @@
<resources>
<string name="yes">Да</string>
<string name="no">Нет</string>
<string name="btn_cancel">Отмена</string>
<string name="btn_update">Обновить</string>
<string name="menu_entries">Спутники</string>
<string name="menu_passes">Пролеты</string>
@@ -9,8 +11,9 @@
<string name="menu_prefs">Настройки</string>
<string name="menu_about">Инфо</string>
<string name="sources_title">Введите HTTPS адрес источника</string>
<string name="sources_title">Управление TLE</string>
<string name="sources_hint">URL источника</string>
<string name="sources_https">Только протокол HTTPS</string>
<string name="sources_error">Пожалуйста, проверьте URL</string>
<string name="entries_update">Обновить спутники:</string>
+4 -1
View File
@@ -5,6 +5,8 @@
<string name="no">No</string>
<string name="yes">Yes</string>
<string name="btn_cancel">Cancel</string>
<string name="btn_update">Update</string>
<string name="menu_entries">Satellites</string>
<string name="menu_passes">Passes</string>
@@ -12,8 +14,9 @@
<string name="menu_prefs">Settings</string>
<string name="menu_about">Info</string>
<string name="sources_title">Enter HTTPS source address</string>
<string name="sources_title">Manage TLE sources</string>
<string name="sources_hint">Source URL</string>
<string name="sources_https">Protocol HTTPS only</string>
<string name="sources_error">Please check the entered URL</string>
<string name="entries_update">TLE data update:</string>