https://kotlinlang.org logo
#android
Title
# android
o

ossama

08/11/2017, 4:00 PM
Help me here please I am using the MVP architecture, the fragments are used as the View component of the MVP. What about my activities ? What should they stand for in the MVP ?
r

rkeazor

08/11/2017, 5:53 PM
Both the Activity and fragment are the View
and they both need separate presenter
o

ossama

08/11/2017, 6:29 PM
@rkeazor And I’ll have two View interfaces then ? one for the activity and one for the fragment ?
r

rkeazor

08/11/2017, 6:30 PM
yep
o

ossama

08/11/2017, 6:31 PM
Many thanks bro 👍 By the way, do you know any github projects or video explanation doing like so ?
r

rkeazor

08/11/2017, 6:31 PM
A good resource is on caster.io
they have a good series on it
o

ossama

08/11/2017, 6:33 PM
You mean this course Mode View Presenter with Android https://caster.io/courses/mvp/ ??
I really appreciate your help 🙏
r

rkeazor

08/11/2017, 7:01 PM
no prob dude
r

radityagumay

08/14/2017, 5:34 PM
@ossama hey, do you still have a problem?
o

ossama

08/14/2017, 7:47 PM
Hey @radityagumay It's ok. Thanks But if you have any additional helpful information, I'd be so grateful
r

radityagumay

08/19/2017, 5:29 PM
https://github.com/radityagumay/contactapp i create this repository to showcase MVP works
in context in android, both of Fragment and Activity are views.
In many cases, i prefer using a fragment as a layout inflated, then a activity only for a container for a fragment (i know other people using a fragmentless approach). why should using a fragment instead of directly using activity? Using a fragment have advantages, you can create a modular ui component for it. lets says, you have has growing and business need, to extend app to tablet. if you using a fragment in previous development, you can easily extend you current code. using modular component also, make your code has single responsibility.
o

ossama

08/19/2017, 7:26 PM
Thanks a lot @radityagumay
r

radityagumay

08/27/2017, 2:26 AM
You welcome
5 Views