com.nineoldandroids.animation.ArgbEvaluator Java Examples

The following examples show how to use com.nineoldandroids.animation.ArgbEvaluator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CheckHeaderView.java    From bither-android with Apache License 2.0 6 votes vote down vote up
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);
}
 
Example #2
Source File: RCheckHeaderView.java    From bither-android with Apache License 2.0 6 votes vote down vote up
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);
}
 
Example #3
Source File: CardFaceView.java    From CardView with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example #4
Source File: MainBottomTabLayout.java    From BigApp_Discuz_Android with Apache License 2.0 4 votes vote down vote up
private void init() {
    mColorEvaluator = new ArgbEvaluator();
}