Questions tagged [mvp]

Model View Presenter (MVP) is a derivative of the model-view-controller software pattern, used mostly for building user interfaces.

Model-view-presenter (MVP) is a derivative of the model-view-controller software pattern, used mostly for building user interfaces.

In MVP, the presenter assumes the functionality of the "middle-man" (played by the application controller in MVC). Additionally, the view is responsible for handling the UI events (like mouse down, key down, etc.), which used to be the controller's job. Eventually, the model becomes strictly a domain model.

Source: Wikipedia article Model–view–presenter

1962 questions
0
votes
1 answer

Firing order issue

I have an issue where some a line of code is firing before it should do (in my eyes, at least). The code in question is Line 3 of the code in the button click event below. And i cannot figure out why this is. Line 2 of the code sends the event to…
Daniel
  • 3
  • 3
0
votes
1 answer

Differentiate between several events on the same Eventbus

I created an application using MVP pattern, I found this tutorial link and decided to implement it in my application in order for the fragments to communicate with their activities. I moved the implementation of the Eventbus to the correspond…
Anton Makov
  • 825
  • 2
  • 9
  • 25
0
votes
0 answers

Issue with injecting dependencies in Fragment (MVP, Dagger2, Kotlin)

I`m new in Android. I try to build project on Fragments via Dagger2 and Kotlin with MVP pattern. I caught an error while building project. Error:(11, 2) error: com.company.my.ui.users.UsersPresenter
0
votes
1 answer

How to get Activity instance and mock kinvey client while writing unit test cases in android

Writing unit test cases for my android application.Currently using the MVP architecture I have conditions to check the network connection but when I run the test case network info(isConnectedToNetwork) is returning the null value. Test case class is…
BAbhilash
  • 1
  • 5
0
votes
1 answer

How can I realize android.app.Service in MVP?

I create Firebase service and I want save data to room when I get Notification. I use MVP and I do not understand how can I use MVP in android.app.Service public class MyFirebaseMessagingService extends FirebaseMessagingService { @Inject …
ip696
  • 6,574
  • 12
  • 65
  • 128
0
votes
2 answers

I am new in dagger 2 how to achieve that?

This is MVP Module @PosterFragmentScope @Module public class PosterFragmentModule { PosterFragmentMVP.View view; Context mContext; public PosterFragmentModule(PosterFragmentMVP.View view,Context mContext) { this.view = view; …
0
votes
1 answer

MVC or MVP for location tracking and alert android application

I am creating a simple personal safety application for students at a University. However having spent several hours researching design patterns, I am still struggling to work out whether MVC or MVP would be better. I understand that MVP allows for…
user2131803
  • 95
  • 1
  • 2
  • 10
0
votes
1 answer

MVP in Android - How to Exchange data/events between Presenters?

I am wondering how you do exchange data or/and events between Presenters in Model-View-Presenter architecture. I have Activity(View) and Presenter for this View, and Dialog(View) and Presenter for this View. When Activity shows Dialog, Dialog's…
user6747491
0
votes
2 answers

iOS MVP data conversion responsibility

Let's say I have class with Date property class SomeModel { ..some properties let date: Date = Date(timeIntervalSince1970: 1505050) ..more properties } and I need to display it using this transformation (or any other, just example) func…
JuicyFruit
  • 2,638
  • 2
  • 18
  • 35
0
votes
1 answer

Architecture Component + MVP

I just start with architecture components, so I would like to know differences with clean architecture and What is the best way to implement with MVP. How to integrate ViewModel with presenter. I appreciate any help with this
0
votes
1 answer

Implementing android MVP pattern and an activity with multiple fragments

I have an activity containing bottom navigation and 3 fragments. I use the repository pattern, lets say its all about user object. Currently, each fragment has its own presenter that i’m instantiating in the onCreateView. I attach the view in…
0
votes
1 answer

AndroidViewModel from Inloop - wrong architecture

Do you know this library? https://github.com/inloop/AndroidViewModel Why is named as ViewModel? I think that it is MVP pattern.
elnino
  • 235
  • 3
  • 12
0
votes
0 answers

Dynamic dependency injection with Dagger on MVP architecture

I’m having an issue with dependency injection with Dagger, and using the MVP architecture, on a view which has dynamic tabs. My activity is consisted basically of multiple tabs, which each tab has just a list of items (thus they all will be using…
0
votes
0 answers

MVP in JavaFX - Misunderstand about James_D's example

During my researchs, I found this question here : Applying MVC With JavaFx where James_D is talking about a clear approach about MVP in JavaFX (Full APP here : https://github.com/james-d/SimpleMVP). I read and understand the code and it really…
0
votes
1 answer

Should we check for view visibility in Presenter or Activity in MVP pattern?

so, i am following MVP pattern and i am delegating every view task to presenter, just the way it should be done for ex. : @Override public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i1) { …
Abhishek Tiwari
  • 936
  • 10
  • 25