janishar / android-mvvm-architecture

This repository contains a detailed sample app that implements MVVM architecture using Dagger2, Room, RxJava2, FastAndroidNetworking and PlaceholderView
https://janisharali.com
Apache License 2.0
2.96k stars 936 forks source link

Queries #22

Closed Sutirth closed 6 years ago

Sutirth commented 6 years ago

Hey Amit,

Had few queries.

1) I have custom font setup in base activity. But in recycler view unable to extend those is it okay to pass context to Recycler view?. Secondly is it okay to use recycler view onAddItemTouchListener from the activity rather clicking from the adapter?

2) Also, how do you direct to activity from a service in this architecture. A local Broadcast receiver is a viable option but I guess its a rudimentary approach. Using event bus is an option (green robot, otto) but does that breaks the architecture anyhow?

amitshekhariitbhu commented 6 years ago
  1. Yes. it is ok to pass the context.
  2. EventBus or RxBus kind of thing is better option.
Sutirth commented 6 years ago

Thank so much for your answer amit have you used the same.