異步加載界面
@ViewDescriptor(
name = "Loading...",
rows = 1,
patterns = {"ZZZZZZZZZ"},
cancelMove = {'Z'}
)
public final class MyLoadingView implements LoadingView {
@Override
public void renderView(Void model, UIContext context) {
AnimatedButtonFactory animatedButton = context.factory(AnimatedButtonFactory.class); // 動畫按鈕組件工廠
context.pattern('Z') // 指定 pattern Z
.fill( // 填滿組件
animatedButton.interval(1) // 動畫間隔
.icons( // 圖案動畫列表
Material.GREEN_STAINED_GLASS_PANE,
Material.RED_STAINED_GLASS_PANE,
Material.BLUE_STAINED_GLASS_PANE,
Material.BLACK_STAINED_GLASS_PANE,
Material.WHITE_STAINED_GLASS_PANE
).create()
);
}
}設置為全局異步加載界面
設置為指定 Controller 的異步加載界面
設置為指定的界面互動處理的異步記載界面
最后更新于