Does Android's DataBinding library work with the Transitions framework?
Scene scene = Scene.getSceneForLayout(this, R.layout.creditcardentryview_scene2_expanded, this.getContext());
TransitionManager.go(scene);
scene2Binding = CreditcardentryviewScene2ExpandedBinding.bind(this);
Attempting the code above throws this error: view tag isn't correct on view:null
You should bind the layout prior to creating the Scene:
CreditcardentryviewScene2ExpandedBinding binding = CreditcardentryviewScene2ExpandedBinding.inflate(getLayoutInflater(), this, false);
Scene scene = new Scene(this, binding.getRoot());
TransitionManager.go(scene);
The bind(this)
is failing because this
isn't a bound view. this
is the scene root! So you can also do this:
Scene scene = Scene.getSceneForLayout(this, R.layout.creditcardentryview_scene2_expanded, this.getContext());
TransitionManager.go(scene);
scene2Binding = CreditcardentryviewScene2ExpandedBinding.bind(this.getChildAt(0));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With