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

Mosby 3 MVP - presenter is always recreated when go back to the fragment in the back stack

When we do popBackStack and return to the previous fragment in the back stack, the bundle in the method onViewCreated(View view, Bundle bundle) is always null due to the fact that onSaveInstanceState(Bundle outState) wasn't called before. So, when…
0
votes
1 answer

Disposing Observables in onDettachView

I'm facing the famous IllegalStateException problem in my app. The problem stems after a network request (using Retrofit) is done, returning me an Observable. I'm using the excellent Mosby framework to handle MVP stuff, here is my code: public…
Leonardo
  • 3,141
  • 3
  • 31
  • 60
0
votes
1 answer

Using MVI on Send-only Screen

I'm trying to create a form, send-only view that has a SignaturePad which once the user clicks on the save button, a save intent gets fired and do some background processing. I have the following: Presenter: @Override protected void…
Leonardo
  • 3,141
  • 3
  • 31
  • 60
0
votes
1 answer

Intent not getting fired sometimes

I have the following code: public class CheckoutPresenter extends CheckinOutPresenter { @Inject public CheckoutPresenter(ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread, OnlineBookingRepository…
Leonardo
  • 3,141
  • 3
  • 31
  • 60
0
votes
1 answer

Combine previous observable

I'm trying to combine two forms insertion in one using RxJava, RxAndroid and Mosby3, but I can't find a way to make it work. My structure: public final class CheckinIntent { private final CheckinCommand checkinCommand; private final Bitmap…
Leonardo
  • 3,141
  • 3
  • 31
  • 60
0
votes
1 answer

How to add a base class to a mosby MVPActivity?

I am looking for a way to add a base class to a mosby MVPActivity. Let me explain what i need. Usually when using mosby we would declare an activity like this: public class LoginActivity extends MVPActivity { //... } but…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
0
votes
1 answer

Android mosby Access to view from presenter

I would like to access to view widgets such as TextView or EditText from presenter, how can i do that, in my activity main i want to change scheduleDateTimeNotify text from presenter public class ActivityChannelContent extends…
tux-world
  • 2,680
  • 6
  • 24
  • 55
0
votes
1 answer

Shouldn't the view state be restored before presenter is created?

Recently I've found out that Mosby3 got released and I'm pretty glad that it has much better control over view states and all that jazz, but it came to my attention that presenter is created before view state is restored. Is this intended or is it a…
Dragas
  • 1,140
  • 13
  • 29
0
votes
3 answers

Losing Events during RxJava subscribeOn()

I got the following code using Mosby. Fragment: @Override public Observable loadCardIntent() { return Observable.just(new CardInfo(cardselected, PreferenceManager.getDefaultSharedPreferences(getContext()) …
rackles
  • 1
  • 4
0
votes
2 answers

Testing Mosby with Mockito

I'm using Mosby and I would like to test my simple presenter. public class DetailsPresenter extends MvpBasePresenter { public void showCountry(Country country) { getView().setTitle(country.getName()); …
jakub
  • 3,576
  • 3
  • 29
  • 55
0
votes
1 answer

Support MvpConstraintLayout

I try to support MvpConstraintLayout myself, just copy code from MvpLinearLayout public abstract class MvpConstraintLayout> extends ConstraintLayout implements MvpView,…
busyStone
  • 13
  • 2
0
votes
1 answer

Mosby MVI - dependencies between presenters

I think the "problem" is valid for MVP as well, but in my case I try to sovle it for MVI. Use case I have a main view that shows list of data (each data is a list itself) and a detail view that shows a single items data list in a view pager. I allow…
prom85
  • 16,896
  • 17
  • 122
  • 242
0
votes
1 answer

Load more on retrofit and rxJava

I'm trying load posts from blog. I use mosby + retrofit + rxjava. public class PostRepository implements IPostRepository { private Api api; private long last_id = 0; private Single> postList; public PostRepository(Api…
DrobyshevAlex
  • 145
  • 1
  • 9
0
votes
1 answer

MVP-Mosby-Api10: NoSuchMethodError android.support.v4.app.FragmentActivity.isChangingConfigurations

I get this error on crashlytics panel: Fatal Exception: java.lang.NoSuchMethodError android.support.v4.app.FragmentActivity.isChangingConfigurations com.hannesdorfmann.mosby.mvp.MvpFragment.shouldInstanceBeRetained…
Siavash Abdoli
  • 1,852
  • 3
  • 22
  • 38
0
votes
0 answers

How create two instance of fragment with different injection with dagger 2

I have fragment with observable injection & two observables (network observable and db observable) with same interface. How I can create two instances of fragment with different observables? Update with code: I have two subcomponents with the same…
BaxterZA
  • 1
  • 2