本文整理汇总了Java中android.view.animation.TranslateAnimation.RELATIVE_TO_SELF属性的典型用法代码示例。如果您正苦于以下问题:Java TranslateAnimation.RELATIVE_TO_SELF属性的具体用法?Java TranslateAnimation.RELATIVE_TO_SELF怎么用?Java TranslateAnimation.RELATIVE_TO_SELF使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.view.animation.TranslateAnimation
的用法示例。
在下文中一共展示了TranslateAnimation.RELATIVE_TO_SELF属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: show
@Override
public void show() {
super.show();
getWindow().setContentView(mParent);
AlphaAnimation anim = new AlphaAnimation(0, 1);
anim.setDuration(ANIMATION_DURATION);
mMaskView.setAnimation(anim);
int type = TranslateAnimation.RELATIVE_TO_SELF;
TranslateAnimation anim2 = new TranslateAnimation(type, 0, type, 0, type, 1, type, 0);
anim2.setDuration(ANIMATION_DURATION);
mPanel.setAnimation(anim2);
}
示例2: createTranslationOutAnimation
private Animation createTranslationOutAnimation() {
int type = TranslateAnimation.RELATIVE_TO_SELF;
TranslateAnimation an = new TranslateAnimation(type, 0, type, 0, type, 0, type, 1);
an.setDuration(TRANSLATE_DURATION);
an.setFillAfter(true);
return an;
}
示例3: createTranslationInAnimation
private Animation createTranslationInAnimation() {
int type = TranslateAnimation.RELATIVE_TO_SELF;
TranslateAnimation an = new TranslateAnimation(type, 0, type, 0, type,
1, type, 0);
an.setDuration(TRANSLATE_DURATION);
return an;
}
示例4: createTranslationOutAnimation
private Animation createTranslationOutAnimation() {
int type = TranslateAnimation.RELATIVE_TO_SELF;
TranslateAnimation an = new TranslateAnimation(type, 0, type, 0, type,
0, type, 1);
an.setDuration(TRANSLATE_DURATION);
an.setFillAfter(true);
return an;
}
示例5: createTranslationInAnimation
private Animation createTranslationInAnimation() {
int type = TranslateAnimation.RELATIVE_TO_SELF;
TranslateAnimation an = new TranslateAnimation(type, 0, type, 0, type, 1, type, 0);
an.setDuration(TRANSLATE_DURATION);
return an;
}