Shared Element Transition with Android DataBinding

654 views Asked by At

I am using Conductor API together with Android DataBinding and have been trying to make a simple shared element transition from a controller view to another controller view but it is not working.

Tapping on "Android Databinding" demo from the list of demoS will bring you to a screen where tapping on the displayed textView should transition it to the next screen.

But for now it is being faded in.

Here is my fork of things & here is a ticket for the same.

Update: I think something is not right in my BindedBaseController class?

public abstract class BindedBaseController extends Controller {

    private ViewDataBinding mViewDataBinding;

    protected BindedBaseController() {
    }

    protected BindedBaseController(Bundle args) {
        super(args);
    }

    protected abstract View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container);

    @NonNull
    @Override
    protected View onCreateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
        View view = inflateView(inflater, container);
        mViewDataBinding = DataBindingUtil.bind(view);
        onViewBound(view);
        return view;
    }

    protected void onViewBound(@NonNull View view) {
    }

    @Override
    protected void onDestroyView(@NonNull View view) {
        super.onDestroyView(view);
        mViewDataBinding.unbind();
        mViewDataBinding = null;
    }

    public ViewDataBinding getViewBinding() {
        return mViewDataBinding;
    }
}
0

There are 0 answers