当动画将“animation.relative”与“self”关联时,(0,0)在哪里?

ttvkxqim  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(235)

使用此方法时,(0,0)在哪里?

public static void slideTooltip(final LinearLayout toolTipLayout) {

    TranslateAnimation layoutTranslateAnimation =
        new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0F, Animation.RELATIVE_TO_SELF, 0.0F,
            Animation.RELATIVE_TO_SELF, 2.0F, Animation.RELATIVE_TO_SELF, 0.0F);

    layoutTranslateAnimation.setDuration(10 * 1000);
    layoutTranslateAnimation.setFillAfter(true);
    // layoutTranslateAnimation.setInterpolator(new DecelerateInterpolator());

    final AlphaAnimation alphaAnimation = new AlphaAnimation(0.2F, 1.0F);
    alphaAnimation.setDuration(10 * 1000);

    toolTipLayout.startAnimation(layoutTranslateAnimation);
  }

它是Windows的左上角吗?
它是视图的左上角吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题