Closed laoluani closed 5 years ago
Hi,
we're planning to switch to androidX soon. Until then, it should work fine if you enable jetifier in your project. Did you have issues even after enabling it?
So I tried this and the mappings to the androidX artifacts cause compilation errors.
The androidx.appcompat.app.AppCompatActivity library changed the method signature of onConfigurationChanged(Configuration config) to onConfigurationChanged(@ NonNull Configuration config). Which interops in Kotlin to a non null Configuration type causing compilation errors in the override of your BaseDocumentScanActivity class, which wants a nullable Configuration object. breaking this line
The androidX counterpart of android.support.design.widget.TabLayout.OnTabSelectedListener no longer inherits from android.support.design.widget.TabLayout.BaseOnTabSelectedListener like it does in the support library. As seen here, breaking this line.
The simple fix for 1. was to change the method signature of your BaseDocumentScanActivity override from onConfigurationChanged(Configuration? config) to onConfigurationChanged(Configuration config). The fix for 2. was to create a lambda using the BaseOnTabSelectedListener rather than OnTabSelectedListener.
Thanks, we'll include those 2 fixes in the next release to make sure everything works for both androidX and support lib users.
Awesome looking forward to it and thanks for the speedy replies!
Hi,
we've just released a new version that includes AndroidX fixes.
Hey, I am currently using androidX in my project however this library currently does not support it. My workaround has been to fork the project and make the minor changes myself.
Would be great if this was built in, also happy to make a PR.