Transition a common item with Android DataBinding

I use the Conductor API with Android DataBinding and am trying to make a simple transition from a general element with a controller view to another kind of controller, but it does not work.

Clicking on the “Android Databinding” demo from the list of demos will take you to a screen where clicking on the displayed text element should go to the next screen.

But while it disappears.

Here is my fork , and here is a ticket for this.

Update: I think something is wrong 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;
    }
}
+6

Source: https://habr.com/ru/post/1017194/


All Articles