You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 15中ToastBar被导航按钮遮挡问题求助

Android 15中ToastBar被导航按钮遮挡的问题

在Android 15系统中,ToastBar会被底部导航按钮遮挡。

测试用例代码如下:

Form form = new Form("Hi World", BoxLayout.y());
Button helloButton = new Button("Hello World");
form.add(helloButton);
helloButton.addActionListener(e -> ToastBar.showInfoMessage("Welcome to Codename One"));
form.getToolbar().addMaterialCommandToSideMenu("Hello Command",
        FontImage.MATERIAL_CHECK, 4, e -> hello());

Toolbar toolbar = form.getToolbar();
toolbar.setUIID("toolbar");
form.getContentPane().setSafeArea(true);
form.show();

我尝试添加以下代码修复,但ToastBar仍被遮挡:

ToastBar.getInstance().useFormLayeredPane(true);
form.getLayeredPane().setSafeArea(true);

ToastBar被导航按钮遮挡

内容的提问来源于stack exchange,提问作者Eric

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 06:32:31