Probably the answer is "you can't", because in Mosby 2.0 you need to use fragment and set it to setRetainInstance(true) to preserve Presenter. And the aim of Conductor is to remove the need of using Fragments, so there is no way to use…
I'm trying to understand concept of MvP design pattern. I mean, I get it, its quite easy. The main problem is optimal implementation. I tried to make my own BaseActivity, BasePresenter and BaseView just to extract part of a joint from all of my…
I´m a huge fan of the MVI pattern, that I have recently implemented in one of my android projects, using mosby. There is one problem I haven´t figured out so far how the best way would be to deal with it. It is about finishing intents, eg. a 'save…
I'm otherwise successful using Mosby in my app. I'm now at the point where I'd like to add a presenter to a NavigationView control. I've overridden the control to encapsulate view-ish things such as adding menu items and dynamically appearing child…
I try to use Mosby. But I have one problem.
I have Activity (view), presenter, model, and viewState.
On activity I have button. When I click on button I call the method from presenter to load data:
presenter.loadData()
Method that load data call 2…
I'm trying to implement an MVP Android View (not activity or fragment) with Mosby, however when using the view within an Android Adaptor, and accessing it within an onBindViewHolder, the presenter is not initialized at this time. It appears that…
In our app (which uses Mosby) we have a SearchActivity that uses Retrofit to fetch results.
The basic flow currently is that the SearchActivity has a List (which has a @State annotation) which I add the retrieved results.
From the…
My presenter looks like following:
// I'm retaining the presenter in a singleton instances map and reuse them
// because they are loading data from the internet and this should be done once
// per app start only
public static ArticlePresenter…
Is it possible to use a Fragment as MvpView inside an Activity using Mosby?
For example, this is a stripped-down version of TaskDetailActivity in Google's todo-mvp-dagger project:
public class TaskDetailActivity extends AppCompatActivity {
…
I've migrated to Mosby 3.0.3 and now investigating abilities of PresenterManager.
For me is not completely clear the lifetime of presenter regarding to Activity, Fragment and ViewGroup.
I've looked through ViewGroupMvpDelegateImpl,…
I'm working on an Android app using Mosby MVP library. In one specific Fragment, the ViewState was implemented but not used (the state wasn't changed or anything). Some of the view logic is implemented by widgetManager. I made the state change…
I'm using the Mosby MVI library for a demo app that performs simple CRUD operations on a Restful API using Retrofit2 in my Interactor.
I constructed the ViewStates very similar as in the sample App, containing Throwable when Retrofit responds with…
I'm using Mosby Model-View-Presenter library in an Android app. In one particular view I'm using Bottom Navigation implemented with Design Support Library v25.1.0. I'm switching between 3 fragments in an Activity. For handling rotation configuration…
I am trying to develop an app using Mosby and EventBus. First event I want to have is after user login, creating a sticky event so every screen can access Login info at all times.
Based off the Mosby mail sample, I have a BasePresenter like…
How to configure Assert/Check methods in Android Studio?
I use Mosby MVP framework, and in presenter I often use this pattern:
if (isViewAttached()) {
getView().someViewMethod();
}
getView() marked as @Nullable, so Android Studio shows me…