Codenameone分层布局 [英] Codenameone Layered Layout

查看:59
本文介绍了Codenameone分层布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在分层布局上有两个容器,分别是c1和c2。
c1具有很多按钮,拖动n拖放等功能。
c2具有整个屏幕的半透明背景,具有中心对齐的图像和关闭按钮。

I have two containers on a layered layout say c1 and c2. c1 has a lot of buttons, drag n drop etc. c2 has a translucent background for the entire screen with a centre aligned image and a close button.

当在c1上添加c2时,我需要能够自动禁用c1的所有操作。
虽然可以在运行时在c1上添加c2时以编程方式进行处理,但是自动禁用c1的所有事件将非常有用。

I need to be able to automatically disable all actions for c1 when c2 is added over c1. While I can handle this programatically when c2 is added over c1 during runtime, it would great to automatically disable all events for c1.

有没有更好的方法解决这个问题?

Is there a better way to handle this ?

谢谢

推荐答案

可聚焦的层应从底层组件获取事件。不过还没有测试。

I think making the top layer focusable should grab the events from the underlying component. Haven't tested it though.

这篇关于Codenameone分层布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆