本文整理汇总了Java中android.view.animation.AlphaAnimation.setStartOffset方法的典型用法代码示例。如果您正苦于以下问题:Java AlphaAnimation.setStartOffset方法的具体用法?Java AlphaAnimation.setStartOffset怎么用?Java AlphaAnimation.setStartOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.AlphaAnimation
的用法示例。
在下文中一共展示了AlphaAnimation.setStartOffset方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startAnim
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private void startAnim(View widget) {
int distance = widget.getHeight();
widget.setVisibility(0);
this.mFloatLayout.setVisibility(0);
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
alphaAnimation.setDuration(200);
alphaAnimation.setStartOffset(200);
this.mFloatLayout.setAnimation(alphaAnimation);
this.mAnimation = new TranslateAnimation(0.0f, 0.0f, (float) distance, 0.0f);
this.mAnimation.setDuration(200);
this.mAnimation.setStartOffset(200);
widget.setAnimation(this.mAnimation);
this.mAnimation.start();
alphaAnimation.start();
}
示例2: apply
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
@Override public void apply(@NonNull View view, int index) {
AlphaAnimation alphaAnimation = new AlphaAnimation(0, 1);
alphaAnimation.setFillBefore(true);
alphaAnimation.setDuration(500);
alphaAnimation.setStartOffset(index * 100);
view.startAnimation(alphaAnimation);
}
示例3: startAlpha
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private AlphaAnimation startAlpha() {
AlphaAnimation alpha = new AlphaAnimation(0, 1);
alpha.setInterpolator(this, android.R.anim.accelerate_interpolator);
alpha.setStartOffset(0);
alpha.setDuration(1500);
return alpha;
}
示例4: endAlpha
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private AlphaAnimation endAlpha(int startTime) {
AlphaAnimation alpha = new AlphaAnimation(1, 0);
alpha.setInterpolator(this, android.R.anim.decelerate_interpolator);
alpha.setStartOffset(startTime - 300);
alpha.setDuration(300);
return alpha;
}
示例5: addTextFadeAnimations
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private void addTextFadeAnimations(AnimationSet set) {
AlphaAnimation mFadeInAnim = new AlphaAnimation(1, FADE_MOUNT);
mFadeInAnim.setDuration(CHARACTER_ANIM_DURATION);
set.addAnimation(mFadeInAnim);
AlphaAnimation mFadeOutAnim = new AlphaAnimation(FADE_MOUNT, 1);
mFadeOutAnim.setDuration(CHARACTER_ANIM_DURATION);
mFadeOutAnim.setStartOffset(CHARACTER_ANIM_DURATION + 20);
mFadeOutAnim.setFillAfter(true);
set.addAnimation(mFadeOutAnim);
set.setInterpolator(interpolator);
}
示例6: addLoopFadeAnimations
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private void addLoopFadeAnimations(long duration, AnimationSet set) {
AlphaAnimation mFadeInAnim = new AlphaAnimation(1, FADE_MOUNT);
mFadeInAnim.setDuration(duration);
set.addAnimation(mFadeInAnim);
AlphaAnimation mFadeOutAnim = new AlphaAnimation(FADE_MOUNT, 1);
mFadeOutAnim.setDuration(duration);
mFadeOutAnim.setStartOffset(duration + 50);
set.addAnimation(mFadeOutAnim);
set.setInterpolator(interpolator);
}
示例7: fadeIn
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
public static Animation fadeIn() {
AlphaAnimation animation = new AlphaAnimation(0, 1);
animation.setDuration(300);
animation.setStartOffset(50);
return animation;
}
示例8: fadeOut
import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
public static Animation fadeOut() {
AlphaAnimation animation = new AlphaAnimation(1, 0);
animation.setDuration(300);
animation.setStartOffset(50);
return animation;
}