And when I use android.support.v4.app.FragmentActivity my code work fine.
But now I upgrade android project to use androidx.appcompat.app.AppCompatActivity;
and as result in line:
bindingViewFactory = (ViewFactory) layoutInflaterFactory;
I has runtime error:
FATAL EXCEPTION: main
Process: com.myproject.tango.debug, PID: 10249
java.lang.ClassCastException: androidx.appcompat.app.AppCompatDelegateImpl cannot be cast to gueei.binding.ViewFactory
at com.myproject.binding.widget.BindableWidgetHelper.bindv4Fragment(BindableWidgetHelper.java:138)
at com.myproject.commons.LayoutService.addView(LayoutService.java:128)
at com.myproject.commons.LayoutService.addBody(LayoutService.java:150)
at com.myproject.tango.widget.banner.BannerFragment.prepareChild(BannerFragment.java:211)
at com.myproject.commons.roots.RootFragment.onCreateView(RootFragment.java:103)
at com.myproject.tango.widget.banner.BannerFragment_.onCreateView(BannerFragment_.java:42)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2612)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:874)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1228)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1293)
has custom bindable lib - https://github.com/gueei/AndroidBinding
Here my snippet:
And when I use
android.support.v4.app.FragmentActivity
my code work fine.But now I upgrade android project to use
androidx.appcompat.app.AppCompatActivity;
and as result in line:
bindingViewFactory = (ViewFactory) layoutInflaterFactory;
I has runtime error: