Package include more specified features of MVVM pattern for Android platform:
- Two-way binding
- More @BindingAdapter and @BindingConversion realization
Layout - it's used to describe layout in XML format. All view components are placed here.
Binding - bind data between IViewData and Layout.
It provides complete information on all components of the layout for View.
IView - main component of MVVM pattern. Responsible for the visual component. All animations,
transaction between activities/fragments and UI/UX realization processed by this component.
IViewModel - main component of MVVM pattern. Logical part. Receive and processing data from
Model to IViewData
Model - main component of MVVM pattern. Data model. Describe fundamentals data for application.
As then can be acted Services, DB Helper, HTTP Provider, Business logic e.t.c
Library has default realization most popular components for 2-way binding. More info.
Required for rapid typed text acquisition into IViewData component
<BindableEditText
...
attr:binding="@{model.text}"/>
Required for rapid CompoundButton
state into IViewData component
<ToggleButton
...
attr:binding="@{model.state}"/>
Required for rapid SeekBar
progress into IViewData component
<SeekBar
...
attr:binding="@{model.progress}"/>
Used for binding custom typeface into TextView
widget
<TextView
...
attr:assetTypeface="@{model.pathToTypefaceInAssetsFolder}"/>
<!--or-->
<TextView
...
attr:fileTypeface="@{model.pathToTypefaceFileOrTypefaceFile}"/>
If you doesn't wan't to spend much time for deployment single view into your project, you can use
FreeMarker template for android.
Just put the ..\templates\freemarker\*
templates into ..\AndroidStudioFolder\plugins\android\lib\templates\*
Created on the basis of Fabio Collini tutorial.