-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Guideline #12
Comments
Steps:
Typical workflow
For screens/fragments/list items etc, you create 3 files. You need Start off by creating the interfaces in the UserMvvm fileThis is just a "container" for two inner interfaces - just for quality of life sake to keep them "together" Now you need a interface UserMvvm {
interface View: MvvmView {
//TODO methods/fields that end up in your Activity/Fragment/ViewHolder
}
interface ViewModel: MvvmViewModel<View> {
//TODO methods/fields that end up in your ViewModel
//and are available for use in the XML under `vm.`
}
} Now you can create your XML layout for the activity<layout>
<data>
<variable
name="vm"
type="{full namespace of UserMvvm.ViewModel interface}" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout>
.....
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout> You can continue with your Activity (
|
Hi Patloew,
I really appreciate your work for this template, and I want to learn your template, but I don't know where to get started. Would you like give me some guidelines or instruction for using this template?
thank you
The text was updated successfully, but these errors were encountered: