-
Notifications
You must be signed in to change notification settings - Fork 38
feat: custom UI terms and conditions #569
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
base: main
Are you sure you want to change the base?
Conversation
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.
The Android version wasn’t building. I added a few suggestions that should resolve the Android build issues.
Native Navigation SDK for Android seems to have internal bug with uiParams as the background color always leaks outside of the panel where dropshadow should be.
There is example implementation of this feature to example pages, camera, navigation_without_map and turn_by_turn.
If possible it would be nice to have this on navigation and navigation_without_map example pages only to keep the example pages simple and as those are main navigation related example pages. What do you think?
Please add a new integration test in https://github.com/googlemaps/flutter-navigation-sdk/blob/main/example/integration_test/t02_session_test.dart
that verifies uiParams. Because the integration tests run on both platforms (Android emulator and iOS simulator), this should also help detect potential crashes in the native implementations.
ios/google_navigation_flutter/Sources/google_navigation_flutter/Convert.swift
Outdated
Show resolved
Hide resolved
.../main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionMessageHandler.kt
Outdated
Show resolved
Hide resolved
...oid/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt
Outdated
Show resolved
Hide resolved
...oid/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt
Show resolved
Hide resolved
...oid/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationSessionManager.kt
Outdated
Show resolved
Hide resolved
|
@jokerttu thanks for suggestions, all should be applied now |
jokerttu
left a comment
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.
LGTM, once the suggested small improvement is included.
The default font sizes in TermsAndConditionsUIParams.Builder do not match those used in the standard TOS dialog. This change aligns the defaults to match the standard dialog.
| it.acceptButtonTextColor?.let { color -> setAcceptButtonTextColor(color.toInt()) } | ||
| it.cancelButtonTextColor?.let { color -> setCancelButtonTextColor(color.toInt()) } | ||
| } | ||
| .build() |
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.
Hard code default text sizes on Android to match the default TOS dialog.
| .build() | |
| // TODO: Make text sizes configurable via TermsAndConditionsUIParamsDto. | |
| // Currently hardcoded to match the Navigation SDK default values. | |
| .setButtonsTextSize(14) | |
| .setMainTextTextSize(14) | |
| .setTitleTextSize(20) | |
| .build() |
Default TOS without TermsAndConditionsUIParams.





Fixes #489
Implemented Parameters
backgroundColor- Dialog background colortitleColor- Title text colormainTextColor- Main terms text coloracceptButtonTextColor- Accept button text colorcancelButtonTextColor- Cancel button text colorNot Implemented
Typography (Cross-platform)
More complex problem that can be handled in different PR
Title font (Android:
setTitleTypeface(), iOS:titleFont)Main text font (Android:
setMainTextTypeface(), iOS:mainTextFont)Button font (Android:
setButtonsTypeface(), iOS:buttonsFont)Text Sizes (Android only)
Android only can be handled in different PR
setTitleTextSize()- Title text sizesetMainTextTextSize()- Main text sizesetButtonsTextSize()- Button text sizePre-launch Checklist