Xamarin.Android.StatusBarCompat 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xamarin.Android.StatusBarCompat --version 1.0.0                
NuGet\Install-Package Xamarin.Android.StatusBarCompat -Version 1.0.0                
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="Xamarin.Android.StatusBarCompat" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.Android.StatusBarCompat --version 1.0.0                
#r "nuget: Xamarin.Android.StatusBarCompat, 1.0.0"                
#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 Xamarin.Android.StatusBarCompat as a Cake Addin
#addin nuget:?package=Xamarin.Android.StatusBarCompat&version=1.0.0

// Install Xamarin.Android.StatusBarCompat as a Cake Tool
#tool nuget:?package=Xamarin.Android.StatusBarCompat&version=1.0.0                

https://github.com/niorgai/StatusBarCompat 使用方法

当前需要Android 5.0 以上 //set color for status bar StatusBarCompat.setStatusBarColor(Activity activity, int color) //add alpha to color StatusBarCompat.setStatusBarColor(Activity activity, int statusColor, int alpha)

//translucent status bar
StatusBarCompat.translucentStatusBar(activity);
//should hide status bar background (default black background) when SDK >= 21
StatusBarCompat.translucentStatusBar(Activity activity, boolean hideStatusBarBackground);

//set color for CollapsingToolbarLayout
setStatusBarColorForCollapsingToolbar(Activity activity, AppBarLayout appBarLayout, CollapsingToolbarLayout collapsingToolbarLayout,
                                                                     Toolbar toolbar, int statusColor)

//Change to Light status bar (convert icon and text color to dark, SDK >= 23)
changeToLightStatusBar(Activity activity)

//Cancel Light status bar (convert icon and text color to light)
cancelLightStatusBar(Activity activity)

Use it after call setContentView If use FullScreen Activity, must call StatusBarCompat.translucentStatusBar(activity); If you want to set light status bar, Remember call changeToLightStatusBar() at last.

Product Compatible and additional computed target framework versions.
.NET net6.0-android was computed.  net7.0-android was computed.  net8.0-android was computed.  net9.0-android was computed. 
MonoAndroid monoandroid is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 392 11/13/2021
1.0.0 286 11/13/2021