forked from upstream-mirrors/OpenTracks
@@ -61,12 +61,12 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
|
||||
|
||||
Object bundleMarkerId = getIntent().getExtras().get(EXTRA_MARKER_ID);
|
||||
Marker.Id markerId = null;
|
||||
if (bundleMarkerId instanceof Marker.Id) {
|
||||
markerId = (Marker.Id) bundleMarkerId;
|
||||
if (bundleMarkerId instanceof Marker.Id cast) {
|
||||
markerId = cast;
|
||||
}
|
||||
if (bundleMarkerId instanceof Long) {
|
||||
if (bundleMarkerId instanceof Long cast) {
|
||||
//Incoming Intent via Dashboard API.
|
||||
markerId = new Marker.Id((Long) bundleMarkerId);
|
||||
markerId = new Marker.Id(cast);
|
||||
}
|
||||
if (markerId == null) {
|
||||
Log.d(TAG, "invalid marker id");
|
||||
|
||||
@@ -20,10 +20,10 @@ public class ViewUtils {
|
||||
|
||||
for (int i = 0; i < view.getChildCount(); i++) {
|
||||
final View child = view.getChildAt(i);
|
||||
if (child instanceof ViewGroup) {
|
||||
makeClickableLinks((ViewGroup) child);
|
||||
} else if (child instanceof TextView) {
|
||||
((TextView) child).setMovementMethod(LinkMovementMethod.getInstance());
|
||||
if (child instanceof ViewGroup childVg) {
|
||||
makeClickableLinks(childVg);
|
||||
} else if (child instanceof TextView childTv) {
|
||||
childTv.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user