当动画与`Animation.RELATIVE_TO_SELF`相关时,哪里是(0,0)?

时间:2014-03-11 14:01:17

标签: java android animation android-animation

使用此方法时(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);
  }

它是窗口的左上角吗?

它是视图的左上角吗?

0 个答案:

没有答案