本文整理匯總了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;
}