KeyboardVisibilityListener-MAUI 1.0.2

dotnet add package KeyboardVisibilityListener-MAUI --version 1.0.2                
NuGet\Install-Package KeyboardVisibilityListener-MAUI -Version 1.0.2                
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="KeyboardVisibilityListener-MAUI" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KeyboardVisibilityListener-MAUI --version 1.0.2                
#r "nuget: KeyboardVisibilityListener-MAUI, 1.0.2"                
#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 KeyboardVisibilityListener-MAUI as a Cake Addin
#addin nuget:?package=KeyboardVisibilityListener-MAUI&version=1.0.2

// Install KeyboardVisibilityListener-MAUI as a Cake Tool
#tool nuget:?package=KeyboardVisibilityListener-MAUI&version=1.0.2                

KeyboardVisibilityListener-MAUI

⚠️ Currently only supports Android

Getting started

MauiProgram.cs

using KeyboardVisibilityListener;

var builder = MauiApp.CreateBuilder();
        builder.UseMauiApp<App>()
        .UseKeyboardVisibilityListener() //Add this line
    //Etc ...

Toogle keyboard

 private void ToggleKeyboardVisibilityClicked(object sender, EventArgs e)
 {
     KeyBoardUtils.ToggleKeyboardVisibility();
 }

 private void ForceCloseKeyboardClicked(object sender, EventArgs e)
 {
     KeyBoardUtils.ForceCloseKeyboard(this.Entry1);
 }

Watch keyboard visibility

KeyboardVisibilityState VisibilityState = KeyboardVisibilityState.Instance;

//IsKeyboardOpen property also notifies via PropertyChanged 
//KeyboardVisibilityState.Instance.IsKeyboardOpen 



KeyboardVisibilityState.VisibilityChanged += KeyboardVisibilityState_VisibilityChanged;


private void KeyboardVisibilityState_VisibilityChanged(object? sender, KeyboardVisibilityStateChangedEventArgs e)
{
    Debug.WriteLine("Keyboard visibility has changed");
}

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios17.5 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst17.5 is compatible.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net8.0-android34.0

    • No dependencies.
  • net8.0-ios17.5

    • No dependencies.
  • net8.0-maccatalyst17.5

    • No dependencies.
  • net8.0-windows10.0.19041

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KeyboardVisibilityListener-MAUI:

Package Downloads
StatelessForMAUI

A state machine for maui apps that helps to control app life cycle, navigation and connectivity

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 155 9/4/2024
1.0.1 113 8/28/2024
1.0.0 109 8/26/2024