[android] Linkify osm.org on about fragment

Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-06-01 11:02:34 +02:00
committed by Harry Bond
parent 4627783725
commit b9edb19dcb
3 changed files with 6 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package app.organicmaps.help;
import android.content.res.Configuration;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.util.Linkify;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -53,7 +54,10 @@ public class HelpFragment extends BaseMwmFragment implements View.OnClickListene
final String dataVersion = DateUtils.getShortDateFormatter().format(Framework.getDataVersion());
final TextView osmPresentationView = root.findViewById(R.id.osm_presentation);
if (osmPresentationView != null)
{
osmPresentationView.setText(getString(R.string.osm_presentation, dataVersion));
Linkify.addLinks(osmPresentationView, Linkify.WEB_URLS);
}
setupItem(R.id.news, true, root);
setupItem(R.id.web, true, root);

View File

@@ -153,6 +153,7 @@
android:text="@string/osm_presentation"
android:textAppearance="@style/MwmTextAppearance.Body2"
android:textColor="?android:textColorPrimary"
android:autoLink="web"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/osm_logo"

View File

@@ -106,6 +106,7 @@
android:text="@string/osm_presentation"
android:textAppearance="@style/MwmTextAppearance.Body2"
android:textColor="?android:textColorPrimary"
android:autoLink="web"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/osm_logo"