Skip to content

[Drop-In UI] Fix issue with MapboxExtendableButton so it can be rendered in any shape possible.#6498

Merged
tomaszrybakiewicz merged 1 commit intomainfrom
NAVAND-793_tr_drop-in-fix-mapbox-extendable-button
Oct 28, 2022
Merged

[Drop-In UI] Fix issue with MapboxExtendableButton so it can be rendered in any shape possible.#6498
tomaszrybakiewicz merged 1 commit intomainfrom
NAVAND-793_tr_drop-in-fix-mapbox-extendable-button

Conversation

@tomaszrybakiewicz
Copy link
Copy Markdown
Contributor

@tomaszrybakiewicz tomaszrybakiewicz commented Oct 20, 2022

Closes NAVAND-793

Description

Changes:

  • Moved MapboxExtendableButton re-create logic from UIComponents to UIBinders.
  • Removed MapboxExtendableButtonParams.
  • Removed all ViewStyleCustomization.***ButtonParams fields
  • Added ViewStyleCustomization.***ButtonStyle field for each button
  • Added ViewOptionsCustomization.showCompassActionButton
  • Updated all ***ButtonBinder's to apply button spacing as margins when installing button views.
  • Re-gen dropin module Metalava file.
  • Updated qa-test-app to showcase introduced changes.
  • Fixed mapbox_ic_compass drawable orientation to point at north (original image orientation was at 45 angle, pointing at NE)
  • Moved qa-test-app styles used by MapboxNavigationViewCustomizedActivity to a separate file.

Todos

  • Add CHANGELOG entry

@tomaszrybakiewicz tomaszrybakiewicz added the UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. label Oct 20, 2022
@tomaszrybakiewicz tomaszrybakiewicz requested a review from a team as a code owner October 20, 2022 20:51
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 21, 2022

Codecov Report

Merging #6498 (0d03840) into main (0d03840) will not change coverage.
The diff coverage is n/a.

❗ Current head 0d03840 differs from pull request most recent head 19705b9. Consider uploading reports for the commit 19705b9 to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #6498   +/-   ##
=========================================
  Coverage     70.33%   70.33%           
  Complexity     4941     4941           
=========================================
  Files           724      724           
  Lines         28148    28148           
  Branches       3320     3320           
=========================================
  Hits          19798    19798           
  Misses         7074     7074           
  Partials       1276     1276           

@tomaszrybakiewicz tomaszrybakiewicz changed the title [Drop-In UI] Fix issue with MapboxExtendabluButton so it can be rendered in any shape possible. [Drop-In UI] Fix issue with MapboxExtendableButton so it can be rendered in any shape possible. Oct 21, 2022
@tomaszrybakiewicz tomaszrybakiewicz changed the title [Drop-In UI] Fix issue with MapboxExtendableButton so it can be rendered in any shape possible. [Drop-In UI] Fix issue with MapboxExtendableButton so it can be rendered in any shape possible. Oct 21, 2022
@tomaszrybakiewicz tomaszrybakiewicz force-pushed the NAVAND-793_tr_drop-in-fix-mapbox-extendable-button branch from 76de873 to 6557e8e Compare October 24, 2022 18:13
@tomaszrybakiewicz
Copy link
Copy Markdown
Contributor Author

tomaszrybakiewicz commented Oct 25, 2022

@tomaszrybakiewicz is it possible to change buttons size with styles?

@korshaknn Yes. The buttons use wrap_content for their width and height, and android:minHeight style to constraint their min height.
You can change their size by:

  • using a style with a different icon image and android:minHeight value
  • injecting a custom layout via binder

I've added an example to MapboxNavigationViewCustomizedActivity that shows how to do it.

Copy link
Copy Markdown
Contributor

@abhishek1508 abhishek1508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested a minor change. Otherwise, LGTM

Comment thread CHANGELOG.md Outdated
@tomaszrybakiewicz tomaszrybakiewicz force-pushed the NAVAND-793_tr_drop-in-fix-mapbox-extendable-button branch 2 times, most recently from c8c19a0 to fbf15d6 Compare October 28, 2022 19:34
…inders.

Removed MapboxExtendableButtonParams.
Removed all ViewStyleCustomization.***ButtonParams fields
Added ViewStyleCustomization.***ButtonStyle fields for each button
Added ViewOptionsCustomization.showCompassActionButton
Updated all ***ButtonBinder's to apply margins when installing button views.
Re-gen Metalava file.
Updated qa-test-app to showcase introduced changes.
Fixed CompassButtonComponent unit test
Fixed mapbox_ic_compass drawable to point north.
Moved qa-test-app styles used by MapboxNavigationViewCustomizedActivity to a separate file.
Added compass style override example to qa-test-app.
CHANGELOG entry
Updated how end marigins are applied to Route Preview and Start Nav Buttons

Update libnavui-dropin/src/main/res/layout/mapbox_info_panel_header_route_preview_layout.xml

Co-authored-by: Abhishek Kejriwal <abhishek.kejriwal@mapbox.com>
@tomaszrybakiewicz tomaszrybakiewicz force-pushed the NAVAND-793_tr_drop-in-fix-mapbox-extendable-button branch from fbf15d6 to 19705b9 Compare October 28, 2022 19:44
@tomaszrybakiewicz tomaszrybakiewicz enabled auto-merge (squash) October 28, 2022 20:05
@tomaszrybakiewicz tomaszrybakiewicz merged commit 3dda4f9 into main Oct 28, 2022
@tomaszrybakiewicz tomaszrybakiewicz deleted the NAVAND-793_tr_drop-in-fix-mapbox-extendable-button branch October 28, 2022 20:28
tomaszrybakiewicz added a commit that referenced this pull request Nov 1, 2022
…inders. (#6498)

Removed MapboxExtendableButtonParams.
Removed all ViewStyleCustomization.***ButtonParams fields
Added ViewStyleCustomization.***ButtonStyle fields for each button
Added ViewOptionsCustomization.showCompassActionButton
Updated all ***ButtonBinder's to apply margins when installing button views.
Re-gen Metalava file.
Updated qa-test-app to showcase introduced changes.
Fixed CompassButtonComponent unit test
Fixed mapbox_ic_compass drawable to point north.
Moved qa-test-app styles used by MapboxNavigationViewCustomizedActivity to a separate file.
Added compass style override example to qa-test-app.
CHANGELOG entry
Updated how end marigins are applied to Route Preview and Start Nav Buttons
abhishek1508 pushed a commit that referenced this pull request Nov 1, 2022
…inders. (#6498)

Removed MapboxExtendableButtonParams.
Removed all ViewStyleCustomization.***ButtonParams fields
Added ViewStyleCustomization.***ButtonStyle fields for each button
Added ViewOptionsCustomization.showCompassActionButton
Updated all ***ButtonBinder's to apply margins when installing button views.
Re-gen Metalava file.
Updated qa-test-app to showcase introduced changes.
Fixed CompassButtonComponent unit test
Fixed mapbox_ic_compass drawable to point north.
Moved qa-test-app styles used by MapboxNavigationViewCustomizedActivity to a separate file.
Added compass style override example to qa-test-app.
CHANGELOG entry
Updated how end marigins are applied to Route Preview and Start Nav Buttons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants