How do I can get activity context from Moxy presenter?
At first sight it's very easy...: 1. Add Context getMvpActivity ();
into MvpView
interface and implement it in Acivity.
2. And in a presenter call getViewState().getMvpActivity()
.
But Moxy don't allow to add the non-void methods to MvpView
interface.
Pls help me.
P.S. I need context in the Presenter to init App Component(activity
is a param for static
getter).
Thanks. Sorry for some grammar mistakes.