mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-03 19:27:24 +00:00
Added custom source TLE update dialog
This commit is contained in:
1 parent
5de8787368
commit
1da35e901a
17 files changed
+113
-296
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="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,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="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>
|
||||
@@ -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="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>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.textfield.TextInputLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:hint="@string/sources_hint">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/sourceUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:inputType="textUri" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
@@ -1,83 +0,0 @@
|
||||
<?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,85 +0,0 @@
|
||||
<?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/splashRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/greyDark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splashPosIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/splashTleIcon"
|
||||
app:layout_constraintDimensionRatio="w,1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/splashPosMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_map_pos" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splashTleIcon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/rounded_corner"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:padding="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/splashOkButton"
|
||||
app:layout_constraintDimensionRatio="w,1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/splashTleMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="@+id/splashPosIcon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/splashPosIcon"
|
||||
app:srcCompat="@drawable/ic_update_web" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/splashPosMsg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:gravity="fill"
|
||||
android:padding="8dp"
|
||||
android:text="@string/splash_loc_msg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/splashPosIcon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/splashPosIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/splashPosIcon" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/splashTleMsg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="fill"
|
||||
android:padding="8dp"
|
||||
android:text="@string/splash_tle_msg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/splashTleIcon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/splashPosMsg"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/splashTleIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/splashTleIcon" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/splashOkButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:backgroundTint="@color/greySurface"
|
||||
android:text="@android:string/ok"
|
||||
android:textColor="@color/themeLight"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/splashTleIcon" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -30,7 +30,19 @@
|
||||
android:backgroundTint="@color/greyDark"
|
||||
android:contentDescription="@string/placeholder"
|
||||
android:elevation="4dp"
|
||||
android:src="@drawable/ic_update_web"
|
||||
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"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/import_file"
|
||||
app:layout_constraintEnd_toStartOf="@+id/import_file"
|
||||
app:layout_constraintTop_toTopOf="@+id/import_file" />
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?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>
|
||||
@@ -59,9 +59,5 @@
|
||||
android:id="@+id/nav_info"
|
||||
android:name="com.rtbishop.look4sat.presentation.appInfoScreen.AppInfoFragment"
|
||||
tools:layout="@layout/fragment_info" />
|
||||
<dialog
|
||||
android:id="@+id/nav_dialog_splash"
|
||||
android:name="com.rtbishop.look4sat.presentation.appSplashDialog.AppSplashDialog"
|
||||
tools:layout="@layout/dialog_splash" />
|
||||
|
||||
</navigation>
|
||||
@@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="btn_yes">Да</string>
|
||||
<string name="btn_no">Нет</string>
|
||||
<string name="btn_cancel">Отмена</string>
|
||||
<string name="btn_update">Обновить</string>
|
||||
<string name="yes">Да</string>
|
||||
<string name="no">Нет</string>
|
||||
|
||||
<string name="menu_entries">Спутники</string>
|
||||
<string name="menu_passes">Пролеты</string>
|
||||
@@ -11,9 +9,9 @@
|
||||
<string name="menu_prefs">Настройки</string>
|
||||
<string name="menu_about">Инфо</string>
|
||||
|
||||
<string name="sources_title">Управление TLE</string>
|
||||
<string name="sources_hint">Источник TLE</string>
|
||||
<string name="sources_https">Только протокол HTTPS</string>
|
||||
<string name="sources_title">Введите HTTPS адрес источника</string>
|
||||
<string name="sources_hint">URL источника</string>
|
||||
<string name="sources_error">Пожалуйста, проверьте URL</string>
|
||||
|
||||
<string name="entries_update">Обновить спутники:</string>
|
||||
<string name="entries_search_hint">Имя / Номер</string>
|
||||
@@ -60,11 +58,6 @@
|
||||
<string name="pref_compass_title">Использовать компас</string>
|
||||
<string name="pref_time_utc_title">Показывать время пролета по UTC</string>
|
||||
|
||||
<string name="splash_tle_msg">Данные спутников теряют точность со временем, поэтому
|
||||
их рекомендуется обновлять примерно раз в неделю</string>
|
||||
<string name="splash_loc_msg">Чтобы корректно рассчитывать орбиты спутников,
|
||||
установите позицию наземной станции через меню Настройки</string>
|
||||
|
||||
<string name="tracking_title">Настройки слежения</string>
|
||||
<string name="tracking_rotator_switch">Управление поворотным устройством</string>
|
||||
<string name="tracking_rotator_address">IP адрес поворотного устройства</string>
|
||||
@@ -74,7 +67,7 @@
|
||||
|
||||
<string name="info_version">Версия: %s</string>
|
||||
<string name="info_subtitle">Трекер спутников для Android</string>
|
||||
<string name="info_bmc">Угостить кофе</string>
|
||||
<string name="info_bmc">Поддержать</string>
|
||||
<string name="info_thanks">Огромное спасибо:
|
||||
\n— Вам за использование этого приложения! \nЖелаю всегда чистого неба над головой!
|
||||
\n— <a href="https://github.com/g4dpz">David A. B. Johnson</a> и
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
<string name="app_name" translatable="false">Look4Sat</string>
|
||||
<string name="placeholder" translatable="false">Placeholder</string>
|
||||
|
||||
<string name="btn_no">No</string>
|
||||
<string name="btn_yes">Yes</string>
|
||||
<string name="btn_cancel">Cancel</string>
|
||||
<string name="btn_update">Update</string>
|
||||
<string name="no">No</string>
|
||||
<string name="yes">Yes</string>
|
||||
|
||||
<string name="menu_entries">Satellites</string>
|
||||
<string name="menu_passes">Passes</string>
|
||||
@@ -14,9 +12,9 @@
|
||||
<string name="menu_prefs">Settings</string>
|
||||
<string name="menu_about">Info</string>
|
||||
|
||||
<string name="sources_title">Manage TLE sources</string>
|
||||
<string name="sources_hint">TLE source</string>
|
||||
<string name="sources_https">Protocol HTTPS only</string>
|
||||
<string name="sources_title">Enter HTTPS source address</string>
|
||||
<string name="sources_hint">Source URL</string>
|
||||
<string name="sources_error">Please check the entered URL</string>
|
||||
|
||||
<string name="entries_update">TLE data update:</string>
|
||||
<string name="entries_search_hint">Name / Id</string>
|
||||
@@ -76,11 +74,6 @@
|
||||
<string name="pref_time_utc_title">Show pass time in UTC</string>
|
||||
<string name="pref_compass_title">Use sensors to rotate PolarView</string>
|
||||
|
||||
<string name="splash_tle_msg">TLE satellite data looses precision over time, so it is
|
||||
recommended to update it every week or so</string>
|
||||
<string name="splash_loc_msg">To get the accurate predictions please set
|
||||
the ground station position via the Settings menu</string>
|
||||
|
||||
<string name="tracking_title">Tracking preferences</string>
|
||||
<string name="tracking_rotator_switch">Antenna rotator control</string>
|
||||
<string name="tracking_rotator_address">Rotator IP address</string>
|
||||
|
||||
Reference in new issue
Block a user