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
0 answers

Android MVP - What is the correct way to handle onActivityResult?

onActivityResult should be delegated to the Presenter. Then the Presenter should decide what to do with the result. The question is how to do it in the clean way? There is an example app in Google…
AppiDevo
  • 3,195
  • 3
  • 33
  • 51
0
votes
1 answer

android MVP pattern on memory leak

Currently i am using MVP pattern on android with Contract. So in example my interactor is like this: interface MainInteractor { interface Activity { //function here } interface Presenter { //function here } } and…
DemiDust
  • 313
  • 1
  • 3
  • 19
0
votes
1 answer

(Dagger 2) Provide same instance for different types in MVP

I'm following MVP pattern in my application. I have a view which extends another abstract view class, implements another interface (say A) and also implements View contract (say B) in MVP. I want to have a same instance in dependency graph when I…
Jegan Babu
  • 1,286
  • 1
  • 15
  • 19
0
votes
1 answer

Access Repository to fragment presenter, in MVP model and dagger2

I am using repository pattern in mvp with dagger .In App scope I binded my RemoteDataSource and LocalDataSource: @Binds @AppScope @Remote abstract MainDataSource RemoteDataSource(RemoteDataSource remoteDataSource); @Binds …
Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149
0
votes
0 answers

In The MVP architecture does the Activity or Fragment must be the View component?

In our team, we separate the UI logic from the Activity or fragment by creating a new class for the view and let the Activity/Fragment manage the Life Cycle only is this good practice or not? public abstract class BaseView implements ViewInterface…
Ayat Khrisat
  • 130
  • 2
  • 15
0
votes
0 answers

passing objects in mvp arch

I work with MVP Architecture I get information through an API. In the MODEL LEVEL, I have List I want to pass this List into PRESENTER LEVEL. When I create a function to resolve this issue I got an error message "NULL ERROR" Here is my code :…
0
votes
1 answer

Constructor injecting make MissingBinding in dagger 2 and mvp

I have created simple project with dagger2 and mvp. This is my component : @MainScope @Component(modules = {MainModule.class}) public interface IMainComponent { void inject(MainActivity mainActivity); } and This is…
Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149
0
votes
1 answer

Android: Create new instance of bundle and pass to intent in dagger in mvp

I would like to use MVP with dagger in my project. In view I have this method and into this method I will pass some object to the presenter: @Override public void onLogin(User user, Cookie cookie, UUID sessionId, List permissions) { …
Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149
0
votes
0 answers

Should I use a design pattern in simple activities in android

I am android developer. I am using MVP design pattern in my app. I have some simple layouts in my app I think that it won't a problem to make them without the pattern is this thing accepted or it is a bad practise and I have to avoid doing this
0
votes
1 answer

Kotlin Android MVP + Dagger 2 lateinit property presenter has not been initialized

Trying to use Dagger with Kotlin on Android. And got the exception: Caused by: kotlin.UninitializedPropertyAccessException: lateinit property presenter has not been initialized at…
Oleg Skidan
  • 617
  • 6
  • 24
0
votes
0 answers

Modular android app without RX java or RX android

I had gone through this github app, Buffer app GitHub Link I loved this project and devoted my lot of time to understand it quite nicely. But the only problem is that i want to do it without RX java, I am trying to understand my questions, In the…
0
votes
1 answer

Why does the view methods does not get called inside an Observable which is inside the presenter on a unit test?

I am new to Android Unit Testing and we are currently using MVP+RxJava+Dagger 2. I wrote this test which fails in unit test, but works in production code: @Override public void retrieveListOfBillers() { getMvpView().showLoading(); …
Jepoy
  • 77
  • 1
  • 1
  • 15
0
votes
1 answer

What is the lifecycle of the MVP components?

Which component does the application start from? Where should they be created? (If the view is activity, and if you need to respect the independence of the components). Under what conditions can exist multiple Model or Presenter components? And who…
0
votes
2 answers

Android MVP Null object Reference

I am trying to do the MvP Pattern and I am separating firebase queries in the model part. I get null object reference exception when I call it on the presenter. Model: public class LoginModelz implements LoginContract.LoginModelz { private…
0
votes
0 answers

MVP Architecture

I tried to Refactor the Login Module of the Application Any Mistakes and Suggestions what else should i work on and i should keep in mind Login Presenter.java public class LoginPresenter implements LoginInteractor.LoginPresenter { private…
Vennefor
  • 9
  • 6