xamarin.android - 在 Xamarin.Android 中设置 "SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR"

标签 xamarin.android

在 Android 8.0 及更高版本中,您可以拥有一个轻量级导航栏。在 Android Studio 中设置 UI 标志 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR与方法 setSystemUiVisibility(int) .此功能是否存在于 Xamarin.Android 中?

Android 8.1 上 Gmail 应用的屏幕截图。

enter image description here

最佳答案

你应该能够在你的事件中做到这一点:

Window.DecorView.SystemUiVisibility = (StatusBarVisibility)SystemUiFlags.LightNavigationBar;

...并确保您的目标框架设置为 8.0 (Oreo)

关于xamarin.android - 在 Xamarin.Android 中设置 "SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49378997/

相关文章:

c# - 如何从 System.Diagnostics.Process 停止进程并最终获取统计信息

c# - Xamarin/Mono TLS 异常

android - 为 PocketSphinxAndroidDemo 创建和使用 Java 绑定(bind)库

android - 设备显示为 'adb devices' 但不在 visual studio (xamarin.android) 上

android - 以xamarin形式在 ListView 内随机触发的条目控制焦点取消焦点事件

android - 如何通过 xamarin c# 在 android 中添加具有多个电话号码的联系人?

azure - Monodroid 与 Windows Azure 移动服务

xamarin.android - visual studio 2022 17.3 xamarin android 检测现有进程

c# - FindViewById 返回 null(只有一个,在 OnCreate 内部和 SetContentView 之后)

c# - Mono Android 中的搜索对话框