Questions tagged [android-mvp]

On Android, MVP is a way to separate background tasks from activities/views/fragments to make them independent of most lifecycle-related events. This way an application becomes simpler and code maintainability becomes better. Use this tag if your question is specifically about using MVP in Android.

On Android, MVP is a way to separate background tasks from activities/views/fragments to make them independent of most lifecycle-related events. This way an application becomes simpler and code maintainability becomes better. Use this tag if your question is specifically about using MVP in Android.

The tag should be used along with

278 questions
0
votes
1 answer

Error Code 415 with retrofit

I have created following API class to query the web service @POST("/v1/User/forgot-password") @FormUrlEncoded fun forgotPass(@Field("email") email: String): Call and called it as val call =…
Ahmed S. Durrani
  • 1,535
  • 2
  • 17
  • 41
0
votes
1 answer

Slow Down emission of observable from RxTextView.textChanges

I have been trying to implement this feature where I have to search for every keyword the user types but I have this limitation that I can hit the server only after 1 sec of the previous call. So if I'm typing a, b, c, d the hit should work like…
codeyourstack
  • 341
  • 1
  • 2
  • 11
0
votes
2 answers

How can I pass firebase data to a view class?

I using the firebase firestore to query information to load into a UI fragment. I could easily do. This call in the fragment and set the view data in the on complete listener callback. However, I don't want my view classes doing any database and…
Jerum
  • 71
  • 2
  • 9
0
votes
0 answers

How to restore the application state when using Dagger2 + MVP

EDITED 2 I have an Activity with multiple fragments. The Activity manages a form with several steps, each step being a Fragment. My implementation follows the MVP design pattern and I'm using Dagger2 to inject the components (Presenters, Models,…
Eselfar
  • 3,759
  • 3
  • 23
  • 43
0
votes
1 answer

Android: storing big size of info by realm in MVP pattern

I am trying a project with Rx, dagger,realm,retrofit in MVP pattern.I am not expert in this libraries and i do not know a lot about these libs. In project in Scope Application i declare realm config and then get instance it for inject to my…
Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149
0
votes
1 answer

How to prevent recyclerView from resetting edittext when scrolling?

I am trying to create a list with recyclerview (picture below), and inside i have an edittext, textview and those views can be change. However the value inside edittext and textview are being resetted if the Recyclerview decide to reinflat it, what…
0
votes
2 answers

Presenter is null on injecting in activity

I am trying out dagger2 and want to inject a presenter into the activity, i searched the internet as to why the presenter is null but then i get different implementations of injecting an activity with several modules. Can someone please help me…
0
votes
1 answer

MVP pattern temporary data storage

I am working on an application in which different screens need to load data from API. Like there is a details screen that needs to load data from API on the basis of id passed to it. I am passing id to fragment in bundle created by newInstance…
Ali Zaidi
  • 297
  • 2
  • 14
0
votes
0 answers

LiveData.observe check first parameter by NULL

I use LiveData + MVP architecture. My View in onCreate say to Presenter: presenter = MyApplication.me().getAppComponent().getBasketPresenter(); presenter.attachView(this); presenter.viewIsReady(); And My Presenter get…
ip696
  • 6,574
  • 12
  • 65
  • 128
0
votes
1 answer

How to pass the first throwable error in rxjava2 chain calls?

I'm chaining calls for my network and local api. In case the network api failed to fetch the data, I'm catching it with my local api call. However, in situation where both the network and local api failed, I want to show the user the error from the…
hehe
  • 1,294
  • 13
  • 26
0
votes
1 answer

How can inject Model to Presenter when create it wit dagger2?

I try create MVP + dagger2 I create Model moudule: @Module class ModelsModule { @Provides BasketModel provideBasketModel() { return new BasketModel(); } @Provides ProductModel provideProductModel() { return new…
ip696
  • 6,574
  • 12
  • 65
  • 128
0
votes
4 answers

MVP Implementation in Android

I am looking into MVP architecture Implementation in android. I found too many ways(mention end of the question) to implement it in the android studio, but Still, I am confused. Can someone help me to find the right answer of below questions. What…
Ankit Saini
  • 374
  • 5
  • 15
0
votes
1 answer

Android MVP (Repository pattern) get Camera/Gallery Image?

I am trying to implement MVP architecture using google sample code for mvp. I have an activity as View that has a presenter and model. On button click user can capture and save image in external storage. And on capture click, I also need to play a…
0
votes
2 answers

Dagger with Mvp on Kotlin - Android

I am an Android developer that is just getting into Kotlin, and I have been trying to setup an Mvp Dagger application in Kotlin, but I cannot figure out what is going on. I continue to get this…
hermt2
  • 844
  • 3
  • 14
  • 33
0
votes
2 answers

Android MVP: Best Practice

I am working on a sample Android app and i am trying to implement a presenter class since i follow MVP pattern. My presenter implementation is below public class WeatherForecastPresenter extends AsyncTask { private…
Tartar
  • 5,149
  • 16
  • 63
  • 104