Minor visual fixes for the PolarView and the pass CardView
This commit is contained in:
1 parent
75996057eb
commit
3f54d0f146
4 files changed
+98
-18
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* LookingSat. Amateur radio & weather satellite tracker and passes calculator.
|
||||
* Copyright (C) 2019 Arty Bishop (bishop.arty@gmail.com)
|
||||
* Look4Sat. Amateur radio & weather satellites passes calculator for Android.
|
||||
* 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
|
||||
@@ -188,13 +188,33 @@ class PolarViewFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun drawRadarText(cvs: Canvas) {
|
||||
cvs.drawText("N", center - txtSize / 3, center - radius - scale * 2, txtPaint)
|
||||
cvs.drawText("E", center + radius + scale * 2, center + txtSize / 3, txtPaint)
|
||||
cvs.drawText("S", center - txtSize / 3, center + radius + txtSize, txtPaint)
|
||||
cvs.drawText("W", center - radius - txtSize, center + txtSize / 3, txtPaint)
|
||||
cvs.drawText("0°", center + scale, center - scale * 2, txtPaint)
|
||||
cvs.drawText("30°", center + scale, center - (radius / 3) - scale * 2, txtPaint)
|
||||
cvs.drawText("60°", center + scale, center - ((radius / 3) * 2) - scale * 2, txtPaint)
|
||||
cvs.drawText(
|
||||
context.getString(R.string.polar_north),
|
||||
center - txtSize / 3,
|
||||
center - radius - scale * 2,
|
||||
txtPaint
|
||||
)
|
||||
cvs.drawText(
|
||||
context.getString(R.string.polar_east),
|
||||
center + radius + scale * 2,
|
||||
center + txtSize / 3,
|
||||
txtPaint
|
||||
)
|
||||
cvs.drawText(
|
||||
context.getString(R.string.polar_south),
|
||||
center - txtSize / 3,
|
||||
center + radius + txtSize,
|
||||
txtPaint
|
||||
)
|
||||
cvs.drawText(
|
||||
context.getString(R.string.polar_west),
|
||||
center - radius - txtSize,
|
||||
center + txtSize / 3,
|
||||
txtPaint
|
||||
)
|
||||
cvs.drawText("90°", center + scale, center - scale * 2, txtPaint)
|
||||
cvs.drawText("60°", center + scale, center - (radius / 3) - scale * 2, txtPaint)
|
||||
cvs.drawText("30°", center + scale, center - ((radius / 3) * 2) - scale * 2, txtPaint)
|
||||
}
|
||||
|
||||
private fun drawPassTrajectory(cvs: Canvas) {
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_pass"
|
||||
@@ -22,7 +41,6 @@
|
||||
android:contentDescription="@string/placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/pass_satName"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pass_satName"
|
||||
app:srcCompat="@drawable/ic_pass_inactive" />
|
||||
|
||||
<TextView
|
||||
@@ -47,23 +65,21 @@
|
||||
<TextView
|
||||
android:id="@+id/pass_aosAz"
|
||||
style="@style/CardPassText"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/pass_aos_az"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/pass_maxEl"
|
||||
app:layout_constraintEnd_toStartOf="@+id/pass_maxEl" />
|
||||
app:layout_constraintStart_toStartOf="@+id/pass_progress" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pass_losAz"
|
||||
style="@style/CardPassText"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/pass_los_az"
|
||||
app:layout_constraintBaseline_toBaselineOf="@+id/pass_maxEl"
|
||||
app:layout_constraintStart_toEndOf="@+id/pass_maxEl" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/pass_progress" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pass_maxEl"
|
||||
style="@style/CardPassText"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/pass_maxEl"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@@ -91,7 +107,7 @@
|
||||
android:id="@+id/pass_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/pass_satId"
|
||||
app:layout_constraintStart_toStartOf="@+id/pass_img"
|
||||
app:layout_constraintTop_toBottomOf="@+id/pass_maxEl" />
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<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"
|
||||
@@ -51,6 +70,7 @@
|
||||
android:id="@+id/polar_recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Look4Sat. Amateur radio & weather satellites passes calculator for Android.
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="app_name">Look4Sat</string>
|
||||
|
||||
@@ -68,10 +87,15 @@
|
||||
<string name="pass_satName">%s</string>
|
||||
<string name="pass_satId">Id: %d</string>
|
||||
<string name="pass_aos_az">AOS — %2d°</string>
|
||||
<string name="pass_maxEl">MaxEl: %.1f°</string>
|
||||
<string name="pass_los_az">LOS — %2d°</string>
|
||||
<string name="pass_maxEl">MaxElev: %.1f°</string>
|
||||
<string name="pass_los_az">%2d° — LOS</string>
|
||||
<string name="pass_dateTime">MMM dd @ HH:mm:ss</string>
|
||||
|
||||
<string name="polar_north">N</string>
|
||||
<string name="polar_east">E</string>
|
||||
<string name="polar_south">S</string>
|
||||
<string name="polar_west">W</string>
|
||||
|
||||
<string name="pat_location">%.4f</string>
|
||||
<string name="pat_azimuth">Azimuth: %.1f°</string>
|
||||
<string name="pat_elevation">Elevation: %.1f°</string>
|
||||
|
||||
Reference in new issue
Block a user