ViewPump 0.99.0-alpha
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
<PackageReference Include="ViewPump" Version="0.99.0-alpha" />
paket add ViewPump --version 0.99.0-alpha
#r "nuget: ViewPump, 0.99.0-alpha"
// 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">
</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 | Versions Compatible and additional computed target framework versions. |
---|---|
MonoAndroid | monoandroid10.0 is compatible. |
-
MonoAndroid 10.0
- Xamarin.Google.Android.Material (>= 1.3.0.1)
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 |