如何在代号一中对同一表单上的图像使用幻灯片过渡

How to use slide transition for images on the same form in codename one

请问如何在同一表单上对图像使用幻灯片切换?

我使用了这段代码,但它显示错误

Label lab = new Label();
 lab.setUIID("IMAGE");

  lab.setTransitionOutAnimator(CommonTransitions.createSlideFadeTitle(true,duration.getAsInt(3000)));

请问我该怎么做。谢谢

您需要使用幻灯片。滑动淡入淡出是一种为表单设计的特殊过渡,用于iOS滑动时使标题淡出。

动画组件 entrance/exit 的方法是替换它,例如:

parentContainer.replace(currentComponent, newComponent, CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 400);