【问题标题】:Codename One: Scale down Image with scrolling代号一:通过滚动缩小图像
【发布时间】:2016-11-20 12:53:28
【问题描述】:

我目前在每个表单的顶部都有我的应用程序徽标。由于它占用大量空间,我希望它的大小随着用户向下滚动的次数而缩小,就像许多应用程序一样。

我的徽标目前只是一个容器,其徽标添加到布局中的 NORTH。你们中是否有人已经实现了类似的东西并且可以给我一个提示如何实现这一点?

提前致谢。

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    查看此博客文章以获取 title animations。这是帖子中的相关代码:

    Form hi = new Form("Shai's Social App", new BoxLayout(BoxLayout.Y_AXIS));
    for(int iter = 0 ; iter < 100 ; iter++) {
        hi.add(new Label("Social Data Goes here..."));
    }
    Toolbar tb = new Toolbar();
    hi.setToolbar(tb);
    ComponentAnimation cna = tb.createStyleAnimation("TitleAreaClean", 200);
    ComponentAnimation title = tb.getTitleComponent().createStyleAnimation("TitleClean", 200);
    hi.getAnimationManager().onTitleScrollAnimation(cna, title);
    hi.show();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-08
      • 1970-01-01
      • 1970-01-01
      • 2017-09-27
      • 2014-05-23
      • 1970-01-01
      相关资源
      最近更新 更多