Manas Chaudhari

Results 25 comments of Manas Chaudhari
trafficstars

Can you share an example of Binding that crashes? BindingAdapters are expected to be able to handle null values.

That's a good catch. I am thinking along the lines of making ViewModels implement `Parcelable`. `MvvmActivity` can then serialize and deserialize them.

Support for fragments should be added. I have created https://github.com/manas-chaudhari/android-mvvm/issues/43 for this. Right, perhaps we can have ViewModels return an instance of `Parcelable`. ViewModel can build an internal state class...

Yes, Parcelable would create a dependency on Android SDK. It is not desirable. The core issue here as @szantogab pointed is injecting the dependencies. Retaining the ViewModel would retain the...

Sure. It would be something like this: ```java public abstract class BaseActivity extends MvvmActivity { protected final Navigator navigator = new NavigatorImpl(); private Disposable subscription; // Also, the viewModel object...

Yes, your explanation is accurate. Regarding NFC, I think that we would be mixing two different things by invoking `connect` from onResume. 1. Availability of the resource: Invoking `connect` means...

Interesting example. I haven't figured out yet how to avoid such side-effects. Normally, I implement an `Action` which subscribes to the api call. But even that leads to imperative code....

That will take care of retaining the ViewModel instance. But invoking actions which require context, in a reusable manner, is the main hindrance. So the questions raised in the above...

Also, in reference to the `LoginViewModel` code: As subscription `completes` after detach, that would dispose all subscriptions. So, how do they get reattached on `attach`?