InflationX / ViewPump

View Inflation you can intercept.
Apache License 2.0
897 stars 61 forks source link

Multiple `ViewPump` instances #47

Closed badoualy closed 1 year ago

badoualy commented 5 years ago

From what I gathered from the doc and source code, currently we call only call ViewPump.init once, and have only one configuration

If we want to add some new interceptors later, we have to call init again after getting currently installed interceptors, and add them in the new config

It also means that having an activity specific configuration while maintaining an app wide configuration is possible but complicated

In my case, I have an app-wide configuration, and for one activity, I have to override a specific widget with my own version

jbarr21 commented 5 years ago

This is not something that we are looking to support

badoualy commented 5 years ago

For anyone with the same use-case, one other alternative is to code an interceptor that would do nothing when the current context is not an instance of the wanted activity (unwrapping ContextWrapper, ...).

I'll post the snippet when I'll have time to code it