Last active
February 27, 2019 04:34
-
-
Save WindSekirun/a086c77f8e7589b73d64748b2d4c919b to your computer and use it in GitHub Desktop.
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
import androidx.annotation.NonNull; | |
import androidx.annotation.Nullable; | |
import android.view.View; | |
@SuppressWarnings("unchecked") | |
@javax.annotation.Generated("Android Data Binding") | |
public class TestLayoutBindingImpl extends TestLayoutBinding { | |
@Nullable | |
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes; | |
@Nullable | |
private static final android.util.SparseIntArray sViewsWithIds; | |
static { | |
sIncludes = null; | |
sViewsWithIds = new android.util.SparseIntArray(); | |
sViewsWithIds.put(R.id.swLanguage, 3); | |
} | |
// views | |
@NonNull | |
private final android.widget.LinearLayout mboundView0; | |
@NonNull | |
private final android.widget.TextView mboundView1; | |
@NonNull | |
private final android.widget.TextView mboundView2; | |
// variables | |
// values | |
// listeners | |
// Inverse Binding Event Handlers | |
private androidx.databinding.InverseBindingListener swLanguageandroidCheckedAttrChanged = new androidx.databinding.InverseBindingListener() { | |
@Override | |
public void onChange() { | |
synchronized(TestLayoutBindingImpl.this) { | |
mDirtyFlags |= 0x2L; | |
} | |
requestRebind(); | |
} | |
}; | |
public TestLayoutBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) { | |
this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds)); | |
} | |
private TestLayoutBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) { | |
super(bindingComponent, root, 0 | |
, (android.widget.Switch) bindings[3] | |
); | |
this.mboundView0 = (android.widget.LinearLayout) bindings[0]; | |
this.mboundView0.setTag(null); | |
this.mboundView1 = (android.widget.TextView) bindings[1]; | |
this.mboundView1.setTag(null); | |
this.mboundView2 = (android.widget.TextView) bindings[2]; | |
this.mboundView2.setTag(null); | |
setRootTag(root); | |
// listeners | |
invalidateAll(); | |
} | |
@Override | |
public void invalidateAll() { | |
synchronized(this) { | |
mDirtyFlags = 0x4L; | |
} | |
requestRebind(); | |
} | |
@Override | |
public boolean hasPendingBindings() { | |
synchronized(this) { | |
if (mDirtyFlags != 0) { | |
return true; | |
} | |
} | |
return false; | |
} | |
@Override | |
public boolean setVariable(int variableId, @Nullable Object variable) { | |
boolean variableSet = true; | |
if (BR.activity == variableId) { | |
setActivity((some.package..intro.IntroActivity) variable); | |
} | |
else { | |
variableSet = false; | |
} | |
return variableSet; | |
} | |
public void setActivity(@Nullable some.package..intro.IntroActivity Activity) { | |
this.mActivity = Activity; | |
} | |
@Override | |
protected boolean onFieldChange(int localFieldId, Object object, int fieldId) { | |
switch (localFieldId) { | |
} | |
return false; | |
} | |
@Override | |
protected void executeBindings() { | |
long dirtyFlags = 0; | |
synchronized(this) { | |
dirtyFlags = mDirtyFlags; | |
mDirtyFlags = 0; | |
} | |
int swLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1 = 0; | |
int swLanguageCheckedMboundView2AndroidColorTermConditionGreen1MboundView2AndroidColorTermConditionGray1 = 0; | |
boolean swLanguageChecked = false; | |
if ((dirtyFlags & 0x6L) != 0) { | |
// read swLanguage.checked | |
swLanguageChecked = swLanguage.isChecked(); | |
if((dirtyFlags & 0x6L) != 0) { | |
if(swLanguageChecked) { | |
dirtyFlags |= 0x10L; | |
dirtyFlags |= 0x40L; | |
} | |
else { | |
dirtyFlags |= 0x8L; | |
dirtyFlags |= 0x20L; | |
} | |
} | |
// read swLanguage.checked ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
swLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1 = ((swLanguageChecked) ? (getColorFromResource(mboundView1, R.color.term_condition_gray_1)) : (getColorFromResource(mboundView1, R.color.term_condition_green_1))); | |
// read swLanguage.checked ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
swLanguageCheckedMboundView2AndroidColorTermConditionGreen1MboundView2AndroidColorTermConditionGray1 = ((swLanguageChecked) ? (getColorFromResource(mboundView2, R.color.term_condition_green_1)) : (getColorFromResource(mboundView2, R.color.term_condition_gray_1))); | |
} | |
// batch finished | |
if ((dirtyFlags & 0x6L) != 0) { | |
// api target 1 | |
this.mboundView1.setTextColor(swLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1); | |
this.mboundView2.setTextColor(swLanguageCheckedMboundView2AndroidColorTermConditionGreen1MboundView2AndroidColorTermConditionGray1); | |
} | |
if ((dirtyFlags & 0x4L) != 0) { | |
// api target 1 | |
androidx.databinding.adapters.CompoundButtonBindingAdapter.setListeners(this.swLanguage, (android.widget.CompoundButton.OnCheckedChangeListener)null, swLanguageandroidCheckedAttrChanged); | |
} | |
} | |
// Listener Stub Implementations | |
// callback impls | |
// dirty flag | |
private long mDirtyFlags = 0xffffffffffffffffL; | |
/* flag mapping | |
flag 0 (0x1L): activity | |
flag 1 (0x2L): swLanguage.checked | |
flag 2 (0x3L): null | |
flag 3 (0x4L): swLanguage.checked ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
flag 4 (0x5L): swLanguage.checked ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
flag 5 (0x6L): swLanguage.checked ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
flag 6 (0x7L): swLanguage.checked ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
flag mapping end*/ | |
//end | |
} |
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
import androidx.annotation.NonNull; | |
import androidx.annotation.Nullable; | |
import android.view.View; | |
@SuppressWarnings("unchecked") | |
@javax.annotation.Generated("Android Data Binding") | |
public class TestLayoutBindingImpl extends TestLayoutBinding { | |
@Nullable | |
private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes; | |
@Nullable | |
private static final android.util.SparseIntArray sViewsWithIds; | |
static { | |
sIncludes = null; | |
sViewsWithIds = null; | |
} | |
// views | |
@NonNull | |
private final android.widget.LinearLayout mboundView0; | |
@NonNull | |
private final android.widget.TextView mboundView1; | |
@NonNull | |
private final android.widget.TextView mboundView3; | |
// variables | |
// values | |
// listeners | |
// Inverse Binding Event Handlers | |
private androidx.databinding.InverseBindingListener swLanguageandroidCheckedAttrChanged = new androidx.databinding.InverseBindingListener() { | |
@Override | |
public void onChange() { | |
// Inverse of activity.languageChecked.get() | |
// is activity.languageChecked.set((boolean) callbackArg_0) | |
boolean callbackArg_0 = swLanguage.isChecked(); | |
// localize variables for thread safety | |
// activity != null | |
boolean activityJavaLangObjectNull = false; | |
// activity.languageChecked | |
androidx.databinding.ObservableBoolean activityLanguageChecked = null; | |
// activity.languageChecked.get() | |
boolean activityLanguageCheckedGet = false; | |
// activity | |
some.package..intro.IntroActivity activity = mActivity; | |
// activity.languageChecked != null | |
boolean activityLanguageCheckedJavaLangObjectNull = false; | |
activityJavaLangObjectNull = (activity) != (null); | |
if (activityJavaLangObjectNull) { | |
activityLanguageChecked = activity.languageChecked; | |
activityLanguageCheckedJavaLangObjectNull = (activityLanguageChecked) != (null); | |
if (activityLanguageCheckedJavaLangObjectNull) { | |
activityLanguageChecked.set(((boolean) (callbackArg_0))); | |
} | |
} | |
} | |
}; | |
public TestLayoutBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) { | |
this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds)); | |
} | |
private TestLayoutBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) { | |
super(bindingComponent, root, 1 | |
, (android.widget.Switch) bindings[2] | |
); | |
this.mboundView0 = (android.widget.LinearLayout) bindings[0]; | |
this.mboundView0.setTag(null); | |
this.mboundView1 = (android.widget.TextView) bindings[1]; | |
this.mboundView1.setTag(null); | |
this.mboundView3 = (android.widget.TextView) bindings[3]; | |
this.mboundView3.setTag(null); | |
this.swLanguage.setTag(null); | |
setRootTag(root); | |
// listeners | |
invalidateAll(); | |
} | |
@Override | |
public void invalidateAll() { | |
synchronized(this) { | |
mDirtyFlags = 0x4L; | |
} | |
requestRebind(); | |
} | |
@Override | |
public boolean hasPendingBindings() { | |
synchronized(this) { | |
if (mDirtyFlags != 0) { | |
return true; | |
} | |
} | |
return false; | |
} | |
@Override | |
public boolean setVariable(int variableId, @Nullable Object variable) { | |
boolean variableSet = true; | |
if (BR.activity == variableId) { | |
setActivity((some.package..intro.IntroActivity) variable); | |
} | |
else { | |
variableSet = false; | |
} | |
return variableSet; | |
} | |
public void setActivity(@Nullable some.package..intro.IntroActivity Activity) { | |
this.mActivity = Activity; | |
synchronized(this) { | |
mDirtyFlags |= 0x2L; | |
} | |
notifyPropertyChanged(BR.activity); | |
super.requestRebind(); | |
} | |
@Override | |
protected boolean onFieldChange(int localFieldId, Object object, int fieldId) { | |
switch (localFieldId) { | |
case 0 : | |
return onChangeActivityLanguageChecked((androidx.databinding.ObservableBoolean) object, fieldId); | |
} | |
return false; | |
} | |
private boolean onChangeActivityLanguageChecked(androidx.databinding.ObservableBoolean ActivityLanguageChecked, int fieldId) { | |
if (fieldId == BR._all) { | |
synchronized(this) { | |
mDirtyFlags |= 0x1L; | |
} | |
return true; | |
} | |
return false; | |
} | |
@Override | |
protected void executeBindings() { | |
long dirtyFlags = 0; | |
synchronized(this) { | |
dirtyFlags = mDirtyFlags; | |
mDirtyFlags = 0; | |
} | |
some.package..intro.IntroActivity activity = mActivity; | |
int activityLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1 = 0; | |
androidx.databinding.ObservableBoolean activityLanguageChecked = null; | |
boolean activityLanguageCheckedGet = false; | |
int activityLanguageCheckedMboundView3AndroidColorTermConditionGreen1MboundView3AndroidColorTermConditionGray1 = 0; | |
if ((dirtyFlags & 0x7L) != 0) { | |
if (activity != null) { | |
// read activity.languageChecked | |
activityLanguageChecked = activity.languageChecked; | |
} | |
updateRegistration(0, activityLanguageChecked); | |
if (activityLanguageChecked != null) { | |
// read activity.languageChecked.get() | |
activityLanguageCheckedGet = activityLanguageChecked.get(); | |
} | |
if((dirtyFlags & 0x7L) != 0) { | |
if(activityLanguageCheckedGet) { | |
dirtyFlags |= 0x10L; | |
dirtyFlags |= 0x40L; | |
} | |
else { | |
dirtyFlags |= 0x8L; | |
dirtyFlags |= 0x20L; | |
} | |
} | |
// read activity.languageChecked.get() ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
activityLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1 = ((activityLanguageCheckedGet) ? (getColorFromResource(mboundView1, R.color.term_condition_gray_1)) : (getColorFromResource(mboundView1, R.color.term_condition_green_1))); | |
// read activity.languageChecked.get() ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
activityLanguageCheckedMboundView3AndroidColorTermConditionGreen1MboundView3AndroidColorTermConditionGray1 = ((activityLanguageCheckedGet) ? (getColorFromResource(mboundView3, R.color.term_condition_green_1)) : (getColorFromResource(mboundView3, R.color.term_condition_gray_1))); | |
} | |
// batch finished | |
if ((dirtyFlags & 0x7L) != 0) { | |
// api target 1 | |
this.mboundView1.setTextColor(activityLanguageCheckedMboundView1AndroidColorTermConditionGray1MboundView1AndroidColorTermConditionGreen1); | |
this.mboundView3.setTextColor(activityLanguageCheckedMboundView3AndroidColorTermConditionGreen1MboundView3AndroidColorTermConditionGray1); | |
androidx.databinding.adapters.CompoundButtonBindingAdapter.setChecked(this.swLanguage, activityLanguageCheckedGet); | |
} | |
if ((dirtyFlags & 0x4L) != 0) { | |
// api target 1 | |
androidx.databinding.adapters.CompoundButtonBindingAdapter.setListeners(this.swLanguage, (android.widget.CompoundButton.OnCheckedChangeListener)null, swLanguageandroidCheckedAttrChanged); | |
} | |
} | |
// Listener Stub Implementations | |
// callback impls | |
// dirty flag | |
private long mDirtyFlags = 0xffffffffffffffffL; | |
/* flag mapping | |
flag 0 (0x1L): activity.languageChecked | |
flag 1 (0x2L): activity | |
flag 2 (0x3L): null | |
flag 3 (0x4L): activity.languageChecked.get() ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
flag 4 (0x5L): activity.languageChecked.get() ? @android:color/term_condition_gray_1 : @android:color/term_condition_green_1 | |
flag 5 (0x6L): activity.languageChecked.get() ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
flag 6 (0x7L): activity.languageChecked.get() ? @android:color/term_condition_green_1 : @android:color/term_condition_gray_1 | |
flag mapping end*/ | |
//end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment