小编BaD*_*aDo的帖子

在 Flutter 中为图像编写元数据

我正在开发一个应用程序,允许用户将元数据从 UI 填充到图像中,例如:

  • 姓名
  • 地点
  • 创客笔记
  • ....

有没有办法在 Flutter 中做到这一点?

您可以通过http://metapicz.com/#landing使用任何图片 URL 进行检查

metadata image flutter

7
推荐指数
1
解决办法
816
查看次数

错误setBackground动画后查看

我创建了一个CustomView扩展View.创建一些CustomView并使用动画来移动和旋转它们.更改backgroundResource和错误发生后,新的背景不会填写所有CustomView.请看代码:

    clearAnimation();
    AnimationSet animation = new AnimationSet(true);
    TranslateAnimation translateAnimation = new TranslateAnimation(0, destX - srcX, 0, destY - srcY);
    translateAnimation.setInterpolator(new LinearInterpolator());
    translateAnimation.setDuration((long) MGConstant.ANIMATE_DURATION);
    animation.addAnimation(translateAnimation);

    final float finalX = destX;
    final float finalY = destY;

    animation.setAnimationListener(new AnimationListener() {

        public void onAnimationEnd(Animation arg0) {
            clearAnimation();
            setX(finalX);
            setY(finalY);

            RotateAnimation rotateAnimation = new RotateAnimation(0, degrees, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
            rotateAnimation.setInterpolator(new LinearInterpolator());
            rotateAnimation.setDuration((long) MGConstant.ANIMATE_DURATION);
            rotateAnimation.setFillAfter(true);
            startAnimation(rotateAnimation);
            resetLayout();

            mMoveStatus = false;
            degree = degrees;

        }

        public …
Run Code Online (Sandbox Code Playgroud)

animation android rotateanimation translate-animation

6
推荐指数
1
解决办法
372
查看次数