Added non-txt TLE file import (.tle) #15

This commit is contained in:
Arty Bishop committed 2020-09-09 21:13:24 +01:00
1 parent e97cc49e22
commit 15d414f8f8
4 files changed
+16 -16

No files matched your search

@@ -140,8 +140,8 @@ class MainActivity : AppCompatActivity(), TleSourcesDialogFragment.SourcesSubmit
})
viewModel.getUpdateStatus().observe(this, Observer { result ->
when (result) {
is Result.Success -> getString(R.string.update_tle_success).toast(this)
is Result.Error -> getString(R.string.update_failure).toast(this)
is Result.Success -> getString(R.string.import_data_success).toast(this)
is Result.Error -> getString(R.string.import_data_failure).toast(this)
}
})
}
@@ -154,7 +154,7 @@ class MainActivity : AppCompatActivity(), TleSourcesDialogFragment.SourcesSubmit
drawerBinding.drawerBtnTleFile.setOnClickListener {
val openFileIntent = Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "text/*"
type = "*/*"
}
startActivityForResult(openFileIntent, pickFileReqCode)
mainBinding.drawerLayout.closeDrawers()
+2 -2
View File
@@ -106,7 +106,7 @@
style="@style/DrawerHeader.Button"
android:layout_width="0dp"
android:drawableEnd="@drawable/ic_file_open"
android:text="@string/update_tle_file"
android:text="@string/import_data_file"
app:layout_constraintBottom_toTopOf="@+id/drawer_btn_tle_url"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
@@ -117,7 +117,7 @@
style="@style/DrawerHeader.Button"
android:layout_width="0dp"
android:drawableEnd="@drawable/ic_update_tle"
android:text="@string/update_tle_web"
android:text="@string/import_data_web"
app:layout_constraintBottom_toTopOf="@+id/drawer_btn_github"
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
+6 -6
View File
@@ -26,10 +26,10 @@
<string name="update_loc">Обновить геопозицию</string>
<string name="update_loc_success">Геопозиция обновлена</string>
<string name="update_loc_failure">Проверьте настройки GPS</string>
<string name="update_tle_file">Обновить TLE из файла</string>
<string name="update_tle_web">Обновить TLE по ссылке</string>
<string name="update_tle_success">Данные спутников обновлены</string>
<string name="update_failure">Проверьте интернет-подключение</string>
<string name="import_data_file">Импорт данных из файла</string>
<string name="import_data_web">Импорт данных по ссылке</string>
<string name="import_data_success">Данные спутников обновлены</string>
<string name="import_data_failure">Ошибка импорта данных</string>
<string name="exit_app">Выход</string>
<string name="menu_pass_list">Список пролетов</string>
@@ -92,8 +92,8 @@
<string name="info_swipe_text">Проведите по экрану вниз, чтобы обновить список пролетов
для выбранных спутников</string>
<string name="info_main_text">Приложение Look4Sat использует набор двухстрочных элементов TLE
для вычисления траекторий движения и текущего местоположения спутников. Вы можете обновить
файл TLE при помощи кнопки в главном меню.</string>
для вычисления траекторий движения и текущего местоположения спутников. Вы можете
импортировать БД TLE при помощи кнопки в главном меню.</string>
<string name="info_select_text">Нажмите эту кнопку, чтобы выбрать спутники для слежения</string>
<string name="about_subtitle">Приложение для слежения за спутниками радио и погоды
+5 -5
View File
@@ -28,10 +28,10 @@
<string name="update_loc">Update location</string>
<string name="update_loc_success">Location updated</string>
<string name="update_loc_failure">Check your Location settings</string>
<string name="update_tle_file">Import TLE from file</string>
<string name="update_tle_web">Import TLE from web</string>
<string name="update_tle_success">Satellite data was updated</string>
<string name="update_failure">Check your internet connection</string>
<string name="import_data_file">Import data from file</string>
<string name="import_data_web">Import data from web</string>
<string name="import_data_success">Satellite data was updated</string>
<string name="import_data_failure">Satellite data import failed</string>
<string name="goto_github" translatable="false">GitHub</string>
<string name="exit_app">Exit</string>
@@ -110,7 +110,7 @@
Swipe the screen to refresh the list of passes for selected satellites</string>
<string name="info_main_text">
Look4Sat is using the Two-Line Element set to calculate the satellites positions \n
You can update the TLE file via the corresponding button in the main menu \n \n
You can import the TLE data via the corresponding button in the main menu \n \n
Once the list is calculated, press a pass item for detailed information</string>
<string name="info_select_text">
Press this button to select the satellites you wish to track</string>