mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Linkify osm.org on about fragment
Signed-off-by: Jean-Baptiste Charron <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
Harry Bond
parent
4627783725
commit
b9edb19dcb
@@ -3,6 +3,7 @@ package app.organicmaps.help;
|
|||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.text.util.Linkify;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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 String dataVersion = DateUtils.getShortDateFormatter().format(Framework.getDataVersion());
|
||||||
final TextView osmPresentationView = root.findViewById(R.id.osm_presentation);
|
final TextView osmPresentationView = root.findViewById(R.id.osm_presentation);
|
||||||
if (osmPresentationView != null)
|
if (osmPresentationView != null)
|
||||||
|
{
|
||||||
osmPresentationView.setText(getString(R.string.osm_presentation, dataVersion));
|
osmPresentationView.setText(getString(R.string.osm_presentation, dataVersion));
|
||||||
|
Linkify.addLinks(osmPresentationView, Linkify.WEB_URLS);
|
||||||
|
}
|
||||||
|
|
||||||
setupItem(R.id.news, true, root);
|
setupItem(R.id.news, true, root);
|
||||||
setupItem(R.id.web, true, root);
|
setupItem(R.id.web, true, root);
|
||||||
|
|||||||
@@ -153,6 +153,7 @@
|
|||||||
android:text="@string/osm_presentation"
|
android:text="@string/osm_presentation"
|
||||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||||
android:textColor="?android:textColorPrimary"
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:autoLink="web"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/osm_logo"
|
app:layout_constraintStart_toEndOf="@+id/osm_logo"
|
||||||
|
|||||||
@@ -106,6 +106,7 @@
|
|||||||
android:text="@string/osm_presentation"
|
android:text="@string/osm_presentation"
|
||||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||||
android:textColor="?android:textColorPrimary"
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:autoLink="web"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/osm_logo"
|
app:layout_constraintStart_toEndOf="@+id/osm_logo"
|
||||||
|
|||||||
Reference in New Issue
Block a user