-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nearby plases tmp #21980
base: master
Are you sure you want to change the base?
Nearby plases tmp #21980
Conversation
val app = requireActivity().application as OsmandApplication | ||
app.locationProvider.addLocationListener(this) | ||
app.locationProvider.addCompassListener(this) | ||
mapActivity?.dashboard?.setDashboardVisibility(true, DashboardType.EXPLORE_NEARBY_PLACES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to attach this fragment to dashboard?
@@ -4,7 +4,7 @@ | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="?attr/activity_background_color" | |||
android:background="@null" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this @null
necessary?
@@ -68,7 +68,7 @@ public static List<OsmandApiFeatureData> getExploreImageList(KQuadRect mapRect, | |||
} catch (UnsupportedEncodingException e) { | |||
throw new RuntimeException(e); | |||
} | |||
LOG.debug("Download images " + url.toString()); | |||
LOG.debug("Download images " + url + " {" + Thread.currentThread().getName() + "}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have thread name in PlatformUtil, is it necessary?
override fun updateLocation(location: Location?) { | ||
this.location = location | ||
verticalNearbyAdapter.updateLocation(location) | ||
} | ||
|
||
override fun updateCompassValue(value: Float) { | ||
val now = System.currentTimeMillis() | ||
if (now - lastCompassUpdate > COMPASS_UPDATE_PERIOD) { | ||
lastCompassUpdate = now | ||
updateLocation(location) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to add checks for changes to reduce unnecessary list updates, example
|
||
import org.apache.commons.logging.Log; | ||
|
||
public class ExplorePlacesMenuBuilder extends MenuBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to show info from amenity here? or only from image data?
If needed, we could acquire amenity & show it`s info via AmenityUIHelper or similar to TransportStopMenuBuilder
No description provided.