A lightweight library aiming to speed up Android app development by leveraging the new Android Data Binding together with the Model-View-ViewModel design pattern.
This adds the ability to have viewmodels that contain other viewmodels. In the Android layout files, you might have, say, a (shared) widget that manages phone number entry and validation, and a viewmodel that contains it and manages the validation of the rest of a form. Something like this:
This PR allows you to create an outer FormViewModel that extends AggregateViewModel and a shared PhoneViewModel that extends SubViewModel and is aggreagated within the FormViewModel:
class FormViewModel extends AggregateViewModel {
PhoneViewModel phoneViewModel = new PhoneViewModel();
class FormViewModel() {
addSubviews(phoneViewModel);
}
}
This adds the ability to have viewmodels that contain other viewmodels. In the Android layout files, you might have, say, a (shared) widget that manages phone number entry and validation, and a viewmodel that contains it and manages the validation of the rest of a form. Something like this:
This PR allows you to create an outer
FormViewModel
that extendsAggregateViewModel
and a sharedPhoneViewModel
that extendsSubViewModel
and is aggreagated within theFormViewModel
: