Now I can call presenter like that to update UI at the first time:
@Override
public void onNewViewStateInstance() {
presenter.initialize();
}
in Presenter:
@Override
public void initialize() {
…
I faced with that problem when I started to use ViewPager. As every page is nested Fragment, I can't call setRetainInstance(true) for it. So, I need to store Fragment's state to a Bundle and cancel/recall remote API methods onViewAttached/Detached…
I'm new to Android and MVP in-general, and I've been doing iOS programming for the last 1.5 years, so I find delegate patterns easy to digest. I've implemented MVP in such a way that the view conforms to a presenter's protocol, which lets the…
I am using smack (XMPP library) and Mosby's MvpFagment to show the roster of a user in a listview (his/her connections).
I got the following code which works in a different fragment just doing a network call using the Retrofit library:
public void…
When using mosby-mvi,
Following code works fine -- fired only once when fragment created.
override fun loadIntent(): Observable {
return Observable.just(Unit)
}
Following code works unexpected -- fired each time the activity wake up from…
Having read the article MODEL-VIEW-INTENT written by Hannes Dorfmann, I designed my app using the MVI pattern.
This is my design chart of my application.
I have two reusable fragments, BarFragment and ContentFragment. And my activity is made up of…
Im trying to write some dialogs that involves complex server calls.
Therefore I find it easier if i could just add some MVP stuff in the Dialog file directly.
However, there doesn't seem to be an MvpDialog.
What are some alternatives that I could…
I have some view states like StartingGame and GameStarted. If the user starts a game, I emit both states one after another and start a progress in the first event like following:
var d = Observable.interval(1000L, TimeUnit.MILLISECONDS)
…
When my app completes some async tasks, it notifies UI about it.
For example:
user clicks on "Do work" button inside of my application -> async work started
and switches to another app -> state is saved
then "work" inside my app is finished and…
I am using the Mosby library and MVI as described here: http://hannesdorfmann.com/android/mosby3-mvi-1
My question is about how to wire up a Presenter to render a model, if the model is received from the "business logic" layer, but not directly in…
I have an Android project, Java language and Gradle. I am trying to use Mosby-Conductor libraries, therefore I have imported next libraries:
compile 'com.bluelinelabs:conductor:2.1.4'
compile 'com.hannesdorfmann.mosby3:mvp:3.1.0'
compile…
How can I access MvpFragment from MvpActivity.
Fragment, with current code -
class Fragment1: MvpFragment(){
override fun createPresenter(): Presenter {
return Presenter(getActivity().getApplicationContext())
}
…
I am trying to get dagger working in my application.
After creating Module Component and MyApp i can use dagger to inject database service into view but i am having trouble doing same thing with presenter.
Code:
class MyApp : Application() {
…
it's more a general question rather than a specific one.
Basically I'm developing an Android app which communicates with Ble Peripheral Device.
I handle Ble communication using RxAndroidBle library. As for the general pattern, I decided to try Mosby…