coords position fix

1.2-legacy
goga 2021-03-16 11:38:42 +05:00
rodzic 452bf6f6cb
commit 6958e3c86a
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -113,8 +113,9 @@ class UsersFragment : ScreenFragment("Users"), Logging {
val ourNodeInfo = model.nodeDB.ourNodeInfo
val pos = ourNodeInfo?.validPosition;
if (pos != null) {
val coords = String.format("%.5f %.5f", pos.latitude, pos.longitude).replace(",",".")
val html =
"<a href='geo:${pos.latitude},${pos.longitude}'>${pos.latitude.toString()} ${pos.longitude}</a>"
"<a href='geo:${pos.latitude},${pos.longitude}'>${coords}</a>"
holder.coordsView.text = HtmlCompat.fromHtml(html, Html.FROM_HTML_MODE_LEGACY)
holder.coordsView.movementMethod = LinkMovementMethod.getInstance()
holder.coordsView.visibility = View.VISIBLE

Wyświetl plik

@ -55,13 +55,13 @@
android:id="@+id/coords_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="140dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:text="@string/sample_coords"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toEndOf="@+id/distance_view"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintVertical_bias="0.0" />