Package io.github.inflationx.viewpump
Class ViewPump
-
- All Implemented Interfaces:
public final class ViewPump
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classViewPump.Builder
-
Field Summary
Fields Modifier and Type Field Description private final List<Interceptor>interceptorsprivate final BooleanisReflectionprivate final BooleanisCustomViewCreationprivate final BooleanisStoreLayoutResId
-
Method Summary
Modifier and Type Method Description final List<Interceptor>interceptors()List of interceptors. final BooleanisReflection()Use Reflection to inject the private factory. final BooleanisCustomViewCreation()Use Reflection to intercept CustomView inflation with the correct Context. final BooleanisStoreLayoutResId()Store the resourceId for the layout used to inflate the View in the View tag. final InflateResultinflate(InflateRequest originalRequest)final Viewcreate(Context context, Class<out View> clazz, AttributeSet attrs)Allows for programmatic creation of Views via reflection on class name that are still pre/post-processed by the inflation interceptors. final static Unitinit(ViewPump viewPump)final static ViewPumpget()final static Unitreset()final static Viewcreate(Context context, Class<out View> clazz)final static ViewstaticCreateDeprecated(Context context, Class<out View> clazz, AttributeSet attrs)final static ViewPump.Builderbuilder()-
-
Method Detail
-
interceptors
final List<Interceptor> interceptors()
List of interceptors.
-
isReflection
final Boolean isReflection()
Use Reflection to inject the private factory.
-
isCustomViewCreation
final Boolean isCustomViewCreation()
Use Reflection to intercept CustomView inflation with the correct Context.
-
isStoreLayoutResId
final Boolean isStoreLayoutResId()
Store the resourceId for the layout used to inflate the View in the View tag.
-
inflate
final InflateResult inflate(InflateRequest originalRequest)
-
create
final View create(Context context, Class<out View> clazz, AttributeSet attrs)
Allows for programmatic creation of Views via reflection on class name that are still pre/post-processed by the inflation interceptors.
- Parameters:
context- The context.clazz- The class of View to be created.
-
init
@Deprecated(message = "Global singletons are bad for testing, scoping, and composition. Use local ViewPump instances instead.", level = DeprecationLevel.ERROR) final static Unit init(ViewPump viewPump)
-
get
@Deprecated(message = "Global singletons are bad for testing, scoping, and composition. Use local ViewPump instances instead.", level = DeprecationLevel.ERROR) final static ViewPump get()
-
reset
@Deprecated(message = "Global singletons are bad for testing, scoping, and composition. Use local ViewPump instances instead.", level = DeprecationLevel.ERROR) final static Unit reset()
-
create
@Deprecated(message = "This no longer works!", level = DeprecationLevel.ERROR) final static View create(Context context, Class<out View> clazz)
-
staticCreateDeprecated
@Deprecated(message = "Global singletons are bad for testing, scoping, and composition. Use local ViewPump instances instead.") final static View staticCreateDeprecated(Context context, Class<out View> clazz, AttributeSet attrs)
-
builder
final static ViewPump.Builder builder()
-
-
-
-