For apps targeting Android Q:
ViewPumpContextWrapper.java uses mConstructorArgsproperty in createCustomViewInternal method via reflection. Currently, this causes a NPE in this method:
final Object[] mConstructorArgsArr = (Object[]) ReflectionUtils.getValue(mConstructorArgs, this);
Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object; # LayoutInflater's mConstructorArgs was being accessed for two reasons: reading and writing the context. When onCreateView() was called, the inflation context was not being passed, so if the developer wanted to get it, they had to read it from mConstructorArgs. When the developer wanted to create a view, with createView(), the developer could not adjust the view's constructor context. New APIs for createView() and onCreateView() were added that take the View Context as an argument.
For apps targeting Android Q: ViewPumpContextWrapper.java uses
mConstructorArgs
property increateCustomViewInternal
method via reflection. Currently, this causes a NPE in this method:final Object[] mConstructorArgsArr = (Object[]) ReflectionUtils.getValue(mConstructorArgs, this);
From https://developer.android.com/preview/non-sdk-q:
Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object; # LayoutInflater's mConstructorArgs was being accessed for two reasons: reading and writing the context. When onCreateView() was called, the inflation context was not being passed, so if the developer wanted to get it, they had to read it from mConstructorArgs. When the developer wanted to create a view, with createView(), the developer could not adjust the view's constructor context. New APIs for createView() and onCreateView() were added that take the View Context as an argument.
minSdkVersion: 21 targetSdkVersion: android-Q io.github.inflationx:calligraphy: 3:3.1 io.github.inflationx:viewpump: 1.0.0