ViewPump 0.99.0-alpha

This is a prerelease version of ViewPump.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ViewPump --version 0.99.0-alpha                
NuGet\Install-Package ViewPump -Version 0.99.0-alpha                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ViewPump" Version="0.99.0-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ViewPump --version 0.99.0-alpha                
#r "nuget: ViewPump, 0.99.0-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ViewPump as a Cake Addin
#addin nuget:?package=ViewPump&version=0.99.0-alpha&prerelease

// Install ViewPump as a Cake Tool
#tool nuget:?package=ViewPump&version=0.99.0-alpha&prerelease                

<div align="center">

GitHub license

</div>

ViewPump

Intercept the view inflation process using InflationX' ViewPump Android library in Xamarin.

ViewPump allows you to intercept the view inflation process. This allows you to customise views on an app-wide scale without having to create sub-classes (although these are supported) both before and after the view itself has been inflated.

Getting Started

Get started by calling ViewPump.ViewPumpService.Init(). Init() has overflow methods where you can provide your own IViewPumpService should you wish to do so.

In each of your Activity's you must override the protected method AttachBaseContext to allow ViewPump to wrap the context:

protected override void AttachBaseContext(Context @base)
{
    base.AttachBaseContext(ViewPumpContextWrapper.Wrap(@base));
}

Intercepting

To begin intercepting, implement ViewPump.Intercepting.IInterceptor. You'll then have access to the Intercept method. When this method is called the view hasn't yet been inflated. To inflate the view simply call on the provided ViewPump.Intercepting.IChain:

public InflateResult Intercept(IChain chain)
{
    // The view has not yet been inflated.

    var result = chain.Proceed();
    
    // The view has been inflated.
    
    return result;
}

Add your interceptor by calling ViewPump.ViewPumpService.Instance.AddInterceptor(new MyCustomInterceptor()).

Samples

See samples for examples.

Product Compatible and additional computed target framework versions.
MonoAndroid monoandroid10.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ViewPump:

Package Downloads
DialogMessaging

A customizable, cross platform, dialog messaging service for Xamarin.Android and Xamarin.iOS.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 535 1/10/2022
1.0.2 436 1/10/2022
1.0.2-alpha-b55c5b5 163 1/10/2022
1.0.1 344 10/15/2021
1.0.0 332 9/7/2021
0.99.0-alpha 212 4/30/2021
0.1.0 361 3/4/2021