Created
April 4, 2019 13:20
-
-
Save rafaelneiva/cf79a22c753ee325aff6ccd54d332ece to your computer and use it in GitHub Desktop.
Setter template for Databinding BaseObservable in Android Studio
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
#set($paramName = $helper.getParamName($field, $project)) | |
#if($field.modifierStatic) | |
static ## | |
#end | |
void set$StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))($field.type $paramName) { | |
#if ($field.name == $paramName) | |
#if (!$field.modifierStatic) | |
this.## | |
#else | |
$classname.## | |
#end | |
#end | |
$field.name = $paramName; | |
notifyPropertyChanged(BR.$field.name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment