Questions tagged [mosby]

Mosby is a Model-View-Presenter (MVP) library for android apps.

More information about Mosby can be found on here

68 questions
1
vote
0 answers

Mosby: any onNewViewState() method after Views inflated?

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() { …
Alexandr
  • 3,859
  • 5
  • 32
  • 56
1
vote
1 answer

How to keep Presenter's instance of nested Fragment while screen rotation

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…
Alexandr
  • 3,859
  • 5
  • 32
  • 56
1
vote
1 answer

Is my implementation pattern for MVP valid?

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…
Carter Hudson
  • 1,176
  • 1
  • 11
  • 23
1
vote
2 answers

Android Smack with MVP fragment

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…
Gooey
  • 4,740
  • 10
  • 42
  • 76
0
votes
1 answer

How to avoid loadIntent() get fired each time on fragment start

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…
Jovi Phoe
  • 55
  • 9
0
votes
1 answer

How can I ensure the first Observable is subscribed before the second one emits in RxJava2?

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…
Jovi Phoe
  • 55
  • 9
0
votes
1 answer

How to add mosby MVP structure to a dialog?

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…
Zhen Liu
  • 7,550
  • 14
  • 53
  • 96
0
votes
1 answer

How to restore running animation after rotation

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) …
prom85
  • 16,896
  • 17
  • 122
  • 242
0
votes
2 answers

How to save View's state after pause?

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…
Alexandr
  • 3,859
  • 5
  • 32
  • 56
0
votes
0 answers

Update view using MVI with Mosby

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…
user836003
  • 421
  • 6
  • 10
0
votes
0 answers

Mosby interfaces MvpView and MvpPresenter are not visible, version 3.1.0

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…
0
votes
1 answer

Method onCreate() is not call

app/build.gradle: apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' dependencies { ... implementation 'com.hannesdorfmann.mosby3:mvi:3.1.0' implementation…
Alex
  • 705
  • 1
  • 9
  • 18
0
votes
1 answer

Java Mosby Fragments

How can I access MvpFragment from MvpActivity. Fragment, with current code - class Fragment1: MvpFragment(){ override fun createPresenter(): Presenter { return Presenter(getActivity().getApplicationContext()) } …
0
votes
3 answers

How can i inject object into presenter in android kotlin MVP mosby app with dagger

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() { …
Piotr
  • 177
  • 1
  • 2
  • 12
0
votes
1 answer

Android Ble client app architecture

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…
Jogosb
  • 155
  • 1
  • 12