当前位置: 首页>>代码示例>>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;未经允许,请勿转载。