Swapped the onboarding activity for a simple dialog

This commit is contained in:
Arty Bishop committed 2021-02-28 13:05:38 +00:00
1 parent 7d970b9287
commit 38d21b98a0
19 files changed
+191 -338

No files matched your search

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?><!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Look4Sat. Amateur radio satellite tracker and pass predictor.
Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0dp"
android:color="@color/greySurface" />
<solid android:color="@color/greySurface" />
<corners android:radius="8dp" />
</shape>
@@ -1,28 +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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.splashScreen.SplashActivity">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/splashPager"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/splashNext"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/splashNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/fab_padding"
android:contentDescription="@string/placeholder"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/ic_next" />
</androidx.constraintlayout.widget.ConstraintLayout>
+4 -3
View File
@@ -2,7 +2,7 @@
<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="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/greyDark"
android:padding="4dp">
@@ -32,17 +32,18 @@
<ImageButton
android:id="@+id/tleSourceBtnAdd"
android:layout_width="48dp"
android:layout_height="0dp"
android:layout_height="48dp"
android:backgroundTint="@color/greySurface"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_add"
app:layout_constraintBottom_toBottomOf="@+id/tleSourcesWarning"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintEnd_toEndOf="@+id/tleSourcesRecycler"
app:layout_constraintTop_toTopOf="@+id/tleSourcesTitle" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tleSourcesRecycler"
android:layout_width="266dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
+85
View File
@@ -0,0 +1,85 @@
<?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/splashButton"
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/splashButton"
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>
@@ -1,63 +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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.splashScreen.PosFragment">
<androidx.cardview.widget.CardView
android:id="@+id/splashPosTitleCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="16dp"
android:backgroundTint="@color/greySurface"
app:cardCornerRadius="8dp"
app:layout_constraintBottom_toTopOf="@+id/splashPosIcon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="spread_inside">
<TextView
android:id="@+id/splashPosTitle"
style="@style/SplashText"
android:text="@string/pref_gsp_title" />
</androidx.cardview.widget.CardView>
<ImageView
android:id="@+id/splashPosIcon"
style="@style/SplashText.Icon"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_map_pos"
app:layout_constraintBottom_toTopOf="@+id/splashPosMsgCard"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/splashPosTitleCard" />
<androidx.cardview.widget.CardView
android:id="@+id/splashPosMsgCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp"
android:backgroundTint="@color/greySurface"
app:cardCornerRadius="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/splashPosIcon">
<TextView
android:id="@+id/splashPosMsg"
style="@style/SplashText.Msg"
android:text="@string/splash_loc_msg" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,63 +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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.splashScreen.TleFragment">
<androidx.cardview.widget.CardView
android:id="@+id/splashTleTitleCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="48dp"
android:layout_marginEnd="16dp"
android:backgroundTint="@color/greySurface"
app:cardCornerRadius="8dp"
app:layout_constraintBottom_toTopOf="@+id/splashTleIcon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="spread_inside">
<TextView
android:id="@+id/splashTleTitle"
style="@style/SplashText"
android:text="@string/splash_tle_title" />
</androidx.cardview.widget.CardView>
<ImageView
android:id="@+id/splashTleIcon"
style="@style/SplashText.Icon"
android:contentDescription="@string/placeholder"
android:src="@drawable/ic_satellite"
app:layout_constraintBottom_toTopOf="@+id/splashTleMsgCard"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/splashTleTitleCard" />
<androidx.cardview.widget.CardView
android:id="@+id/splashTleMsgCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="48dp"
android:backgroundTint="@color/greySurface"
app:cardCornerRadius="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/splashTleIcon">
<TextView
android:id="@+id/splashTleMsg"
style="@style/SplashText.Msg"
android:text="@string/splash_tle_msg" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -70,5 +70,9 @@
android:id="@+id/nav_dialog_sources"
android:name="com.rtbishop.look4sat.ui.mainScreen.SourcesDialog"
tools:layout="@layout/dialog_sources" />
<dialog
android:id="@+id/nav_dialog_splash"
android:name="com.rtbishop.look4sat.ui.mainScreen.SplashDialog"
tools:layout="@layout/dialog_splash" />
</navigation>
+4 -5
View File
@@ -56,11 +56,10 @@
<string name="pref_compass_title">Использовать компас</string>
<string name="pref_time_utc_title">Показывать время пролета по UTC</string>
<string name="splash_tle_msg">Look4Sat использует набор элементов TLE для вычисления положения
спутников. Со временем эти данные теряют точность, поэтому их рекомендуется обновлять
примерно раз в неделю через меню Спутники.</string>
<string name="splash_loc_msg">Look4Sat нужно знать Ваше местоположение, чтобы корректно рассчитывать орбиты
и пролёты спутников. Установить позицию можно через соответствующие кнопки в меню Настройки.</string>
<string name="splash_tle_msg">Данные спутников теряют точность со временем, поэтому
их рекомендуется обновлять примерно раз в неделю</string>
<string name="splash_loc_msg">Чтобы корректно рассчитывать орбиты спутников,
установите позицию наземной станции через меню Настройки</string>
<string name="info_version">Версия: %s</string>
<string name="info_subtitle">Трекер спутников для Android</string>
+4 -7
View File
@@ -73,13 +73,10 @@
<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_title" translatable="false">Two-Line Element set</string>
<string name="splash_tle_msg">Look4Sat uses a TLE set to calculate the satellite positions.
The TLE data looses precision over time, so it is recommended to update
it weekly using the buttons in the Satellites menu</string>
<string name="splash_loc_msg">Look4Sat needs to know your position to deliver the accurate
passes predictions. Please set the position using the buttons (GPS, QTH Locator)
in the Settings menu</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="info_version">Version: %s</string>
<string name="info_subtitle">Satellite tracker and pass predictor</string>
-18
View File
@@ -14,24 +14,6 @@
<item name="snackbarTextViewStyle">@style/Snackbar.Text</item>
</style>
<style name="SplashText">
<item name="android:padding">8dp</item>
<item name="android:textSize">23sp</item>
<item name="android:gravity">center</item>
<item name="android:layout_gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="SplashText.Msg">
<item name="android:textSize">17sp</item>
</style>
<style name="SplashText.Icon">
<item name="android:layout_width">128dp</item>
<item name="android:layout_height">128dp</item>
</style>
<style name="Snackbar" parent="@style/Widget.MaterialComponents.Snackbar">
<item name="backgroundTint">@color/greySurface</item>
</style>