Created
July 19, 2019 05:17
-
-
Save kishansinhparmar/35e1c4a861c4bb23fa38ba91ebf48626 to your computer and use it in GitHub Desktop.
This template will inflate and initialize common code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
binding = DataBindingUtil.inflate(inflater, R.layout.$layout_file$, container, false) | |
val vm by lazy { | |
ViewModelProviders.of(this, $VIEWMODEL_CLASS$Factory(repo)) | |
.get($VIEWMODEL_CLASS$::class.java) | |
} | |
binding.$VIEWMODEL_VARIABLE_NAME_FROM_XML$ = vm | |
binding.lifecycleOwner = this | |
return binding.root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment