简体   繁体   English

为什么 Android 上的 AppBar 背景颜色不是完全白色?

[英]Why is the AppBar background color not completely white on Android?

I set Scaffold appBar: to null , but the Appbar is grey not white.我将Scaffold appBar:设置为null ,但 Appbar 是灰色而不是白色。

return Scaffold(
    appBar: null,
    body: .......
);

应用栏

And I also set AppBar color to white but result is same as null .我还将 AppBar 颜色设置为白色,但结果与null相同。

How can I make Appbar color be white?如何使 Appbar 颜色为白色? Set null is not enough?设置null还不够?

Below image is the AppBar of Google Play Store.下图是 Google Play 商店的 AppBar。

Play 商店应用栏

To hide status bar or disable notification bar in Android, IT admins must perform the following two steps:要在 Android 中隐藏状态栏或禁用通知栏,IT 管理员必须执行以下两个步骤:

1.Add devices to Kiosk Mode 2.Hide notification bar 1.将设备添加到信息亭模式 2.隐藏通知栏

1.Add device to Kiosk Mode 1_ On the MDM console, create an Android profile by navigating to Device Mgmt -> Profiles -> New Profile -> Android. 1.将设备添加到 Kiosk 模式 1_ 在 MDM 控制台上,通过导航到设备管理 -> 配置文件 -> 新配置文件 -> Android 创建 Android 配置文件。 2_ Specify a name and description before creating the profile. 2_ 在创建配置文件之前指定名称和描述。 3_ From the left pane, select Kiosk for creating a Kiosk Mode profile 4_ Select Single App if you want to run only one app on the device and Multi-app for running multiple apps on the devices 5_ Enter the name of the app(s) that need to be provisioned in Kiosk. 3_ 从左侧窗格中,选择 Kiosk 以创建 Kiosk 模式配置文件 4_ 如果您只想在设备上运行一个应用程序,则选择单个应用程序,选择多应用程序以在设备上运行多个应用程序 5_ 输入应用程序的名称需要在 Kiosk 中进行配置。 How to hide status bar on Android devices?如何在 Android 设备上隐藏状态栏? To hide or disable the status and notification bar on Android devices while enabling Kiosk Mode, follow the steps given below:要在启用 Kiosk 模式时隐藏或禁用 Android 设备上的状态和通知栏,请按照以下步骤操作:

1_ Select the Kiosk Mode profile to which you've added the apps to be provisioned in Kiosk Mode. 1_ 选择您已添加要在 Kiosk 模式下配置的应用程序的 Kiosk 模式配置文件。 2_ Navigate to Device Restrictions to disable the status bar in Android devices. 2_ 导航到设备限制以禁用 Android 设备中的状态栏。 3_ Restrict the Status Bar option to disable the status bar on the device. 3_ 限制状态栏选项以禁用设备上的状态栏。 By default the Status Bar expansion option is restricted, which disables the notification bar.默认情况下,状态栏扩展选项是受限的,这会禁用通知栏。 You can also optionally disable the Task Bar to prevent users from accessing the default launcher or exiting Kiosk.您还可以选择禁用任务栏以防止用户访问默认启动器或退出 Kiosk。 Click on Save to save the profile.单击保存以保存配置文件。 Distribute the profile to Groups or devices based on your requirements根据您的要求将配置文件分发到组或设备

Use AppBar 's systemOverlayStyle property:使用AppBarsystemOverlayStyle属性:

AppBar(
  systemOverlayStyle: SystemUiOverlayStyle(statusBarColor: Colors.white),
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么背景颜色保持白色? (Xamarin.Forms 安卓) - Why background color stay white? (Xamarin.Forms Android) Android edittext颜色白色背景上的白色 - Android edittext color white on white background 为什么 Android Image Asset Studio 生成的通知图标颜色全白? - Why is the color for the notification icons generated by Android Image Asset Studio completely white? 棒棒糖上的android通知背景颜色不是白色 - android notification background color is not white on lollipop android actionbar背景颜色是灰色而不是白色 - android actionbar background color is grey instead of white Android背景颜色设置为灰色而不是@android:颜色/白色 - Android background color set to gray instead of @android:color/white Android-白色背景颜色,自动更改为其他颜色 - Android - White background color, Automatically change to another color 当背景颜色为白色时,不会更改Android通知图标颜色 - Android notification icon color is not changed when background color is white Android应用栏背景颜色和(返回按钮和更多菜单项图标颜色)冲突 - Android appbar background color and (back button and more menu item icon color) conflict 更改Android AppBar上的颜色按钮 - Change color buttons on Android AppBar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM