當前位置: 首頁>>代碼示例>>Java>>正文


Java ScaleAnimation.setStartOffset方法代碼示例

本文整理匯總了Java中android.view.animation.ScaleAnimation.setStartOffset方法的典型用法代碼示例。如果您正苦於以下問題:Java ScaleAnimation.setStartOffset方法的具體用法?Java ScaleAnimation.setStartOffset怎麽用?Java ScaleAnimation.setStartOffset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.animation.ScaleAnimation的用法示例。


在下文中一共展示了ScaleAnimation.setStartOffset方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: startScale

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private ScaleAnimation startScale() {
	ScaleAnimation scale = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	scale.setInterpolator(this, android.R.anim.accelerate_interpolator);
	scale.setStartOffset(0);
	scale.setDuration(1500);
	return scale;
}
 
開發者ID:isuhao,項目名稱:QMark,代碼行數:8,代碼來源:WelcomeSnowActy.java

示例2: randomScale

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private ScaleAnimation randomScale() {
	float scaleTo = (float) (0.3f + Math.random() * 0.5f);
	ScaleAnimation scale = new ScaleAnimation(1, scaleTo, 1, scaleTo, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	scale.setRepeatCount(Animation.INFINITE);
	scale.setRepeatMode(Animation.REVERSE);
	scale.setStartOffset(1000);
	scale.setDuration((int) (Math.random() * 3000) + 1000);
	return scale;
}
 
開發者ID:isuhao,項目名稱:QMark,代碼行數:10,代碼來源:WelcomeSnowActy.java

示例3: endScale

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private ScaleAnimation endScale(int startTime) {
	ScaleAnimation scale = new ScaleAnimation(1, 0, 1, 0, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
	scale.setInterpolator(this, android.R.anim.decelerate_interpolator);
	scale.setStartOffset(startTime - 300);
	scale.setDuration(300);
	return scale;
}
 
開發者ID:isuhao,項目名稱:QMark,代碼行數:8,代碼來源:WelcomeSnowActy.java

示例4: addTextZoomAnimations

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private void addTextZoomAnimations(AnimationSet set) {
    ScaleAnimation mScaleAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleAnim.setDuration(CHARACTER_ANIM_DURATION);
    set.addAnimation(mScaleAnim);
    ScaleAnimation mScaleDownAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleDownAnim.setDuration(CHARACTER_ANIM_DURATION);
    mScaleDownAnim.setStartOffset(CHARACTER_ANIM_DURATION + 20);
    mScaleDownAnim.setFillAfter(true);
    set.addAnimation(mScaleDownAnim);
    set.setInterpolator(interpolator);
}
 
開發者ID:HarinTrivedi,項目名稱:AnimatedPullToRefresh-master,代碼行數:12,代碼來源:AnimationHelper.java

示例5: addLoopScaleAnimations

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private void addLoopScaleAnimations(long duration, AnimationSet set) {
    ScaleAnimation mScaleAnim = new ScaleAnimation(1, SCALE_AMOUNT, 1f, SCALE_AMOUNT, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleAnim.setDuration(duration);
    set.addAnimation(mScaleAnim);
    ScaleAnimation mScaleDownAnim = new ScaleAnimation(SCALE_AMOUNT, 1, SCALE_AMOUNT, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    mScaleDownAnim.setDuration(duration);
    mScaleDownAnim.setStartOffset(duration + 50);
    set.addAnimation(mScaleDownAnim);
    set.setInterpolator(interpolator);
}
 
開發者ID:HarinTrivedi,項目名稱:AnimatedPullToRefresh-master,代碼行數:11,代碼來源:AnimationHelper.java

示例6: getZoomInAnimation

import android.view.animation.ScaleAnimation; //導入方法依賴的package包/類
private ScaleAnimation getZoomInAnimation(long startOffset, long touchTime) {
    ScaleAnimation zoomIn = new ScaleAnimation(SCALE_FACTOR, 1f, SCALE_FACTOR, 1f);
    zoomIn.setStartOffset(startOffset+SCALE_DURATION+touchTime);
    zoomIn.setDuration(SCALE_DURATION);
    zoomIn.setFillAfter(true);
    return zoomIn;
}
 
開發者ID:elimu-ai,項目名稱:start-guide,代碼行數:8,代碼來源:GestureHelper.java


注:本文中的android.view.animation.ScaleAnimation.setStartOffset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。