[android] Add track recording widget to the map screen #9929
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
4 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#9929
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "track-recording-widget"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This implementation is mirror of #9847 for android devices
Partially Fixes #9173
It implements track recording widget on Map screen, Route plan screen and Navigation screen.
Redesigns the landscape layout (similar to iOS) to avoid overlaps.
Sorry for the delay with the review!
you forgot your debug output :)
@ -594,4 +594,4 @@
mNavBarHeight = isFullscreen() ? 0 : windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom;
// For the first loading, set compass top margin to status bar size
// The top inset will be then be updated by the routing controller
if (mCurrentWindowInsets == null)
are you sure the
else
branch is not needed anymore?i.e. when
mCurrentWindowInsets != null
then no need to update compass offset?put
TrackRecorder.nativeIsTrackRecordingEnabled()
into a final/const so that you don't have query it multiple timesits a bit strange to first increase
offsetX
and then decrease it back :)maybe the logic could be re-arranged
final?
final?
final?
final?
button
would be a more clear variable namemake it into one
if
?@ -211,0 +217,4 @@
windowManager.getDefaultDisplay().getRealMetrics(metrics);
return metrics.heightPixels;
}
please add a comment what does it return - pixels or dp?
or maybe rename the method so that its clear from the name
this string is about Layers
is it needed at all?
why do you use LayersButton and not generic FloatingActionButton?
if LayersButton functionality is needed then it'd be better to rename LayersButton to something more generic
@ -594,4 +594,4 @@
mNavBarHeight = isFullscreen() ? 0 : windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom;
// For the first loading, set compass top margin to status bar size
// The top inset will be then be updated by the routing controller
if (mCurrentWindowInsets == null)
I have moved it out of else and we are updating it every time, if part is for special case (see line 600 below) organicmaps/organicmaps#9929/commits/af8e6c1ae1bac60ee63cf429c625df3d64dd5e16#:~:text=updateBottomWidgetsOffset
For simplicity of code and to avoid usage of else statement I did that (i.e same logic less lines). Should I replace it with else statements?
for offsetY final can't be used because its value is updated later
sorry I forgot to change it : )
How about
This page contains Most of the codes for the other buttons present on the screen. I just copied and manipulated it. Since other buttons are LayerButtons so I used it for similarity. Should I change it?
no its redundant since I copied the layer button that's why its there, I will remove it : )
thanks, this looks perfect
yes please use a generic FAB
the LayersButton has functionality specific to the layers button (left top corner) and is not needed for track recording
@ -590,14 +590,14 @@ public class MwmActivity extends BaseMwmFragmentActivity
ViewCompat.setOnApplyWindowInsetsListener(mPointChooser, (view, windowInsets) -> {
final
what about this one?
Thanks working on this
Thanks!