Closed carterhudson closed 3 years ago
Hi! Has the third-party library migrated to AndroidX
? That might be the issue
//<>****Without Hilt Dependencies we can access parent activity as below**** val context = (context as ContextWrapper).baseContext
use requireActivity() instead activity
I'm using a third-party library that has some custom view implementations. In the implementation, they call
Utils.showSoftKeyboard(context as Activity)
. This, along with using the fragment as an@AndroidEntryPoint
causes the following exceptionjava.lang.ClassCastException: dagger.hilt.android.internal.managers.ViewComponentManager$FragmentContextWrapper cannot be cast to android.app.Activity
. Is there any way to fix this without altering the third-party library?