This pull request adds materialPopupStyle attribute which allows customizing the default style that will be used by all of the popups created by this library (unless overridden in the builder via style property)
Example
Here I've applied the below change. Notice how all of the popups except for these that define custom style have changed to that dark style with dimmed background.
I've also cleaned a bit usage of ContextThemeWrapper. Now it's created only once and passed to MaterialRecyclerViewPopupWindow directly as a Context. Also I've removed the context from PopupMenuAdapter and instead made all views inherit from their parent view context which in turn makes them use the context from MaterialRecyclerViewPopupWindow. (Unless I'm somehow mistaken 😏). You can ignore that second commit if you don't want that change. It shouldn't affect the topic of this pull request but I found it related enough to keep here.
This pull request adds
materialPopupStyle
attribute which allows customizing the default style that will be used by all of the popups created by this library (unless overridden in the builder viastyle
property)Example
Here I've applied the below change. Notice how all of the popups except for these that define custom style have changed to that dark style with dimmed background.
Additional change
I've also cleaned a bit usage of
ContextThemeWrapper
. Now it's created only once and passed toMaterialRecyclerViewPopupWindow
directly as aContext
. Also I've removed the context fromPopupMenuAdapter
and instead made all views inherit from their parent view context which in turn makes them use the context fromMaterialRecyclerViewPopupWindow
. (Unless I'm somehow mistaken 😏). You can ignore that second commit if you don't want that change. It shouldn't affect the topic of this pull request but I found it related enough to keep here.