mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Enhancement :- Explore Map information
This commit is contained in:
parent
efdff5e9c5
commit
1b67b8643b
1 changed files with 3 additions and 0 deletions
|
|
@ -718,11 +718,14 @@ public class ExploreMapFragment extends CommonsDaggerSupportFragment
|
|||
}
|
||||
|
||||
String title = nearbyBaseMarker.getPlace().name;
|
||||
// Remove "File:" if present at start
|
||||
if (title.startsWith("File:")) {
|
||||
title = title.substring(5);
|
||||
}
|
||||
// Remove extensions like .jpg, .jpeg, .png, .svg (case insensitive)
|
||||
title = title.replaceAll("(?i)\\.(jpg|jpeg|png|svg)$", "");
|
||||
title = title.replace("_", " ");
|
||||
//Truncate if too long because it doesn't fit the screen
|
||||
if (title.length() >43) {
|
||||
title = title.substring(0, 40) + "...";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue