use of android.view.animation.AccelerateDecelerateInterpolator in project SmoothProgressBar by castorflex.
the class MakeCustomActivity method setInterpolator.
private void setInterpolator(int position) {
switch(position) {
case 1:
mCurrentInterpolator = new LinearInterpolator();
mSeekBarFactor.setEnabled(false);
break;
case 2:
mCurrentInterpolator = new AccelerateDecelerateInterpolator();
mSeekBarFactor.setEnabled(false);
break;
case 3:
mCurrentInterpolator = new DecelerateInterpolator(mFactor);
mSeekBarFactor.setEnabled(true);
break;
case 4:
mCurrentInterpolator = new FastOutSlowInInterpolator();
mSeekBarFactor.setEnabled(true);
break;
case 0:
default:
mCurrentInterpolator = new AccelerateInterpolator(mFactor);
mSeekBarFactor.setEnabled(true);
break;
}
mProgressBar.setSmoothProgressDrawableInterpolator(mCurrentInterpolator);
mProgressBar.setSmoothProgressDrawableColors(getResources().getIntArray(R.array.gplus_colors));
updateValues();
}
use of android.view.animation.AccelerateDecelerateInterpolator in project UltimateAndroid by cymcsg.
the class RippleBackgroundActivity method foundDevice.
private void foundDevice() {
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.setDuration(400);
animatorSet.setInterpolator(new AccelerateDecelerateInterpolator());
ArrayList<Animator> animatorList = new ArrayList<Animator>();
ObjectAnimator scaleXAnimator = ObjectAnimator.ofFloat(foundDevice, "ScaleX", 0f, 1.2f, 1f);
animatorList.add(scaleXAnimator);
ObjectAnimator scaleYAnimator = ObjectAnimator.ofFloat(foundDevice, "ScaleY", 0f, 1.2f, 1f);
animatorList.add(scaleYAnimator);
animatorSet.playTogether(animatorList);
foundDevice.setVisibility(View.VISIBLE);
animatorSet.start();
}
use of android.view.animation.AccelerateDecelerateInterpolator in project ENViews by codeestX.
the class ENScrollView method select.
public void select() {
if (mCurrentState == STATE_SELECT) {
return;
}
mCurrentState = STATE_SELECT;
ValueAnimator valueAnimator = ValueAnimator.ofObject(new ArgbEvaluator(), mBgLineColor, mLineColor);
valueAnimator.setDuration(mDuration);
valueAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
mFraction = valueAnimator.getAnimatedFraction();
mCurrentColor = (int) valueAnimator.getAnimatedValue();
invalidate();
}
});
if (!valueAnimator.isRunning()) {
valueAnimator.start();
}
valueAnimator.start();
}
use of android.view.animation.AccelerateDecelerateInterpolator in project ENViews by codeestX.
the class ENVolumeView method closeVolume.
private void closeVolume() {
ValueAnimator valueAnimator = ValueAnimator.ofFloat(1.f, 100.f);
valueAnimator.setDuration(800);
valueAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
mFraction = 1 - valueAnimator.getAnimatedFraction();
invalidate();
}
});
if (!valueAnimator.isRunning()) {
valueAnimator.start();
}
}
use of android.view.animation.AccelerateDecelerateInterpolator in project WilliamChart by diogobernardino.
the class BarCardThree method show.
@Override
public void show(Runnable action) {
super.show(action);
Tooltip tip = new Tooltip(mContext);
tip.setBackgroundColor(Color.parseColor("#CC7B1F"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat(View.ALPHA, 1);
tip.setEnterAnimation(alpha).setDuration(150);
alpha = PropertyValuesHolder.ofFloat(View.ALPHA, 0);
tip.setExitAnimation(alpha).setDuration(150);
}
mChart.setTooltips(tip);
BarSet dataset = new BarSet(mLabels, mValues[0]);
dataset.setColor(Color.parseColor("#eb993b"));
mChart.addData(dataset);
mChart.setBarSpacing(Tools.fromDpToPx(1.5f));
mChart.setXLabels(AxisRenderer.LabelPosition.NONE).setYLabels(AxisRenderer.LabelPosition.NONE).setXAxis(false).setYAxis(false);
Animation anim = new Animation().setEasing(new AccelerateDecelerateInterpolator()).setEndAction(action);
mChart.show(anim);
}
Aggregations