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


Java ArgbEvaluator類代碼示例

本文整理匯總了Java中com.nineoldandroids.animation.ArgbEvaluator的典型用法代碼示例。如果您正苦於以下問題:Java ArgbEvaluator類的具體用法?Java ArgbEvaluator怎麽用?Java ArgbEvaluator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: init

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
/**
 * 控件初始化
 **/
private void init() {
    LayoutInflater.from(mContext).inflate(R.layout.layout_vertical_notication_scroll_bar, this);
    mSwitchViewGroup = (SwitchViewGroup) findViewById(R.id.switchViewGroup);
    ll_vertical_notication_scroll_bar_container = (LinearLayout) findViewById(R.id.ll_vertical_notication_scroll_bar_container);
    iv_layout_vertical_notication_scroll_bar_close = (ImageView) findViewById(R.id.iv_layout_vertical_notication_scroll_bar_close);
    iv_layout_vertical_notication_scroll_bar_close.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            closeScrollBar();
        }
    });
    mDatas = new ArrayList<>();
    tempArgbEvaluator = new ArgbEvaluator();
    mMhandler = new Handler();
}
 
開發者ID:foreverxiongtao,項目名稱:CustomerLib,代碼行數:19,代碼來源:VerticalNoticationScrollBar.java

示例2: initView

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
private void initView() {
    removeAllViews();
    addView(LayoutInflater.from(getContext()).inflate(R.layout.layout_check_header, null),
            LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    ivLight = findViewById(R.id.iv_light);
    tvStatus = (TextView) findViewById(R.id.tv_check_status);
    btnCheck = (Button) findViewById(R.id.btn_check);
    llPoints = (LinearLayout) findViewById(R.id.ll_points);
    tvPoints = (TextView) findViewById(R.id.tv_points);
    btnCheck.setOnClickListener(checkClick);
    bgBeginColor = getResources().getColor(R.color.check_points_begin);
    bgEndColor = getResources().getColor(R.color.check_points_end);
    bgMiddleColor = getResources().getColor(R.color.check_points_middle);
    bgEvaluator = new ArgbEvaluator();
    setPassedCheckCount(0);
}
 
開發者ID:bither,項目名稱:bither-android,代碼行數:17,代碼來源:CheckHeaderView.java

示例3: initView

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
private void initView() {
    removeAllViews();
    addView(LayoutInflater.from(getContext()).inflate(R.layout.layout_r_check_header, null),
            LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    ivLight = findViewById(R.id.iv_light);
    tvStatus = (TextView) findViewById(R.id.tv_check_status);
    ibtnCheck = (ImageButton) findViewById(R.id.ibtn_check);
    llPoints = (LinearLayout) findViewById(R.id.ll_points);
    tvPoints = (TextView) findViewById(R.id.tv_points);
    flBottom = (FrameLayout) findViewById(R.id.fl_bottom);
    findViewById(R.id.ibtn_rcheck_info).setOnClickListener(infoClick);
    ibtnCheck.setOnClickListener(checkClick);
    bgBeginColor = getResources().getColor(R.color.check_points_begin);
    bgEndColor = getResources().getColor(R.color.rcheck_end);
    bgMiddleColor = getResources().getColor(R.color.check_points_middle);
    bgEvaluator = new ArgbEvaluator();
    setPassedCheckCount(0);
}
 
開發者ID:bither,項目名稱:bither-android,代碼行數:19,代碼來源:RCheckHeaderView.java

示例4: onFlagChanged

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
private void onFlagChanged(final CardFlag oldFlag, final CardFlag newFlag) {
	int flagColor = CARD_BACKGROUND_COLOR_NOFLAG;
	if (newFlag != null) {
		flagColor = newFlag.getColor();
	}
	
	ValueAnimator fade = ObjectAnimator.ofInt(mCardPaint,
			"color", mCardPaint.getColor(), flagColor);
	fade.setDuration(500);
	fade.setEvaluator(new ArgbEvaluator());
	fade.addUpdateListener(new AnimatorUpdateListener() {
		@Override
		public void onAnimationUpdate(ValueAnimator value) {
			onFlagChangedUpdate(oldFlag, newFlag, value);
			invalidate();
		}
	});
	
	fade.start();
}
 
開發者ID:julioz,項目名稱:CardView,代碼行數:21,代碼來源:CardFaceView.java

示例5: backgroundColor

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
/**
 * Background color animation builder.
 *
 * @param colors the colors
 * @return the animation builder
 */
public AnimationBuilder backgroundColor(int... colors) {
    for (View view : views) {
        ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view, "backgroundColor", colors);
        objectAnimator.setEvaluator(new ArgbEvaluator());
        this.animatorList.add(objectAnimator);
    }
    return this;
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:15,代碼來源:AnimationBuilder.java

示例6: textColor

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
/**
 * Text color animation builder.
 *
 * @param colors the colors
 * @return the animation builder
 */
public AnimationBuilder textColor(int... colors) {
    for (View view : views) {
        if (view instanceof TextView) {
            ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view, "textColor", colors);
            objectAnimator.setEvaluator(new ArgbEvaluator());
            this.animatorList.add(objectAnimator);
        }
    }
    return this;
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:17,代碼來源:AnimationBuilder.java

示例7: backgroundColor

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
public AnimationBuilder backgroundColor(int... colors) {
    for (View view : this.views) {
        ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view, "backgroundColor", colors);
        objectAnimator.setEvaluator(new ArgbEvaluator());
        this.animatorList.add(objectAnimator);
    }
    return this;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:9,代碼來源:AnimationBuilder.java

示例8: textColor

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
public AnimationBuilder textColor(int... colors) {
    for (View view : this.views) {
        if (view instanceof TextView) {
            ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view, "textColor", colors);
            objectAnimator.setEvaluator(new ArgbEvaluator());
            this.animatorList.add(objectAnimator);
        }
    }
    return this;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:11,代碼來源:AnimationBuilder.java

示例9: MyAnimationView

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
public MyAnimationView(Context context) {
    super(context);

    // Animate background color
    // Note that setting the background color will automatically invalidate the
    // view, so that the animated color, and the bouncing balls, get redisplayed on
    // every frame of the animation.
    ValueAnimator colorAnim = ObjectAnimator.ofInt(this, "backgroundColor", RED, BLUE);
    colorAnim.setDuration(3000);
    colorAnim.setEvaluator(new ArgbEvaluator());
    colorAnim.setRepeatCount(ValueAnimator.INFINITE);
    colorAnim.setRepeatMode(ValueAnimator.REVERSE);
    colorAnim.start();
}
 
開發者ID:515445681,項目名稱:NineOldAndroids-master,代碼行數:15,代碼來源:BouncingBalls.java

示例10: init

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
private void init() {
    mColorEvaluator = new ArgbEvaluator();
}
 
開發者ID:BigAppOS,項目名稱:BigApp_Discuz_Android,代碼行數:4,代碼來源:MainBottomTabLayout.java

示例11: createAnimation

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
/**
 * 根據指定的顏色來創建顏色動畫
 * @param colors 指定的顏色
 */
private void createAnimation(int... colors) {
    colorAnim = ObjectAnimator.ofInt(this, "backgroundColor", colors);
    colorAnim.setEvaluator(new ArgbEvaluator());
    colorAnim.setDuration(DURATION);
}
 
開發者ID:XanderWang,項目名稱:ColorViewPager,代碼行數:10,代碼來源:ColorViewPager.java

示例12: buildAnimator

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
@Override
protected void buildAnimator() {
	ObjectAnimator animator = (ObjectAnimator) getAnimator();
	if (animator == null) {
		if (mPropertyType == PropertyDataType.UNKNOWN) {
			Log.w(TAG, "Property data type unknown, cannot animate.");
			return;
		}

		Object target = getTarget();
		String propertyName = AnimationUtils.translatePropertyName(target,
				mPropertyName);

		Object actualObject = target;

		if (target instanceof TiViewProxy) {
			TiUIView intermediateObject = ((TiViewProxy) target).peekView();
			if (intermediateObject != null) {
				actualObject = intermediateObject.getNativeView();
				if (actualObject != null
						&& propertyName.equals(PROPERTY_BACKGROUND_COLOR)
						&& mIntValues.length == 1) {
					// There is no "getBackgroundColor" on Android views,
					// so we wrap it.
					actualObject = new ViewWrapper((View) actualObject);
				}
			} else {
				Log.w(TAG, "View not available for animation.");
			}
		}

		if (actualObject == null) {
			Log.w(TAG, "Object not available for animation (null).");
			return;
		}

		switch (mPropertyType) {
			case FLOAT:
				animator = ObjectAnimator.ofFloat(actualObject,
						propertyName, mFloatValues);
				break;
			case INT:
				animator = ObjectAnimator.ofInt(actualObject, propertyName,
						mIntValues);
				break;
			case UNKNOWN:
				break;
		}

	}

	if (mRepeatCount != AndroidAnimation.NO_INT_VALUE) {
		animator.setRepeatCount(mRepeatCount);
	}

	if (mRepeatMode != AndroidAnimation.NO_INT_VALUE) {
		animator.setRepeatMode(mRepeatMode);
	}

	if (mEvaluator != AndroidAnimation.NO_INT_VALUE) {
		switch (mEvaluator) {
			case AndroidAnimation.INT_EVALUATOR:
				animator.setEvaluator(new IntEvaluator());
				break;
			case AndroidAnimation.FLOAT_EVALUATOR:
				animator.setEvaluator(new FloatEvaluator());
				break;
			case AndroidAnimation.ARGB_EVALUATOR:
				animator.setEvaluator(new ArgbEvaluator());
				break;
			default:
				Log.w(TAG, "Evaluator set to unknown value: " + mEvaluator);
		}
	}

	setAnimator(animator);

	super.setCommonAnimatorProperties();

}
 
開發者ID:billdawson,項目名稱:ti-android-animation,代碼行數:81,代碼來源:ObjectAnimator_.java

示例13: color

import com.nineoldandroids.animation.ArgbEvaluator; //導入依賴的package包/類
@NonNull
public Animator color(int from, int to, float duration, @Nullable Interpolator interpolator, boolean isText) {


    ObjectAnimator animator;


    if (mView instanceof TextView && isText) {

        TextView tv = (TextView) mView;

        tv.setTextColor(from);

        animator = ObjectAnimator.ofInt(mView, "textColor", from, to);
    } else {
        mView.setBackgroundColor(from);
        animator = ObjectAnimator.ofInt(mView, "backgroundColor", from, to);
    }

    setProperties(animator, duration, interpolator);


    animator.setEvaluator(new ArgbEvaluator());


    return animator;
}
 
開發者ID:canyinghao,項目名稱:CanAnimation,代碼行數:28,代碼來源:CanObjectAnimator.java


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