Java 类android.databinding.OnRebindCallback 实例源码

项目:Android-Code-Demos    文件:AnimationActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mBinding = DataBindingUtil.setContentView(this, R.layout.activity_animation);
    mBinding.addOnRebindCallback(new OnRebindCallback() {
        @Override
        public boolean onPreBind(ViewDataBinding binding) {
            ViewGroup view = (ViewGroup) binding.getRoot();
            TransitionManager.beginDelayedTransition(view);
            return true;
        }
    });
    mBinding.setPresenter(new Presenter());
}
项目:DataBindingSample    文件:AnimationActivity.java   
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mBinding = DataBindingUtil.setContentView(this, R.layout.activity_animation);
    mBinding.addOnRebindCallback(new OnRebindCallback() {
        @Override
        public boolean onPreBind(ViewDataBinding binding) {
            ViewGroup view = (ViewGroup) binding.getRoot();
            TransitionManager.beginDelayedTransition(view);
            return true;
        }
    });
    mBinding.setPresenter(new Presenter());
}