[components] For https://github.com/mozilla-mobile/android-components/issues/9932...
commit980305e51843628bd4b67ce53f613a4c0e44fe6b
authorMugurell <Mugurell@users.noreply.github.com>
Mon, 12 Apr 2021 11:32:17 +0000 (12 14:32 +0300)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 14 Apr 2021 16:29:28 +0000 (14 16:29 +0000)
tree7a0abd9077a696a201046d1f499e967e712ed0c9
parentb627db9a9c11ff92ae42b564732d4835fdfcbd0a
[components] For https://github.com/mozilla-mobile/android-components/issues/9932 - BrowserMenuAdapter is now a StickyItems Adapter

The most important new responsibilities are to update the view of the sticky
item.

BrowserMenu's background is only set on the parent's layout so the Adapter will
have to set that same background to the sticky item's view such that other
items scrolling underneath it will be totally obscured.

Because the menu's background can be set in multiple ways (by setting a value
for mozac_browser_menu_background / by passing a MenuStyle or like in Fenix
having a default theme for all "above" views) BrowserMenu will offer a new
backgroundColor property that as the single source of truth for this which can
then be used by the Adapter.
mobile/android/android-components/components/browser/menu/src/main/java/mozilla/components/browser/menu/BrowserMenu.kt
mobile/android/android-components/components/browser/menu/src/main/java/mozilla/components/browser/menu/BrowserMenuAdapter.kt
mobile/android/android-components/components/browser/menu/src/test/java/mozilla/components/browser/menu/BrowserMenuAdapterTest.kt
mobile/android/android-components/components/browser/menu/src/test/java/mozilla/components/browser/menu/BrowserMenuTest.kt