When I implement my app using MVVM architecture. I always have a question of where should I put implementations of PagerAdapter
and RecyclerViewAdapter
. Now I put into Fragments
as inner class.
Asked
Active
Viewed 45 times
0

sailing
- 670
- 1
- 5
- 11
2 Answers
0
I think It does not matter because they are a helper class, but I think you should not put them in activity/frament as an inner class, because they can make this class bigger, just put them into the same package with activity/frament.

GianhTran
- 3,443
- 2
- 22
- 42
0
It does not depend on MVVM architecture.
The best practice is you should not put Adapter
class as an inner class. Just put them in the same package.

Mitesh Vanaliya
- 2,491
- 24
- 39