use of android.view.animation.AccelerateDecelerateInterpolator in project android-adDialog by yipianfengye.
the class MetaballView method startAnimation.
private void startAnimation() {
wa = new MoveAnimation();
wa.setDuration(2500);
wa.setInterpolator(new AccelerateDecelerateInterpolator());
wa.setRepeatCount(Animation.INFINITE);
wa.setRepeatMode(Animation.REVERSE);
startAnimation(wa);
}
use of android.view.animation.AccelerateDecelerateInterpolator in project DiscreteScrollView by yarolegovich.
the class ForecastView method setForecast.
public void setForecast(Forecast forecast) {
Weather weather = forecast.getWeather();
currentGradient = weatherToGradient(weather);
if (getWidth() != 0 && getHeight() != 0) {
initGradient();
}
weatherDescription.setText(weather.getDisplayName());
weatherTemperature.setText(forecast.getTemperature());
Glide.with(getContext()).load(weatherToIcon(weather)).into(weatherImage);
invalidate();
weatherImage.animate().scaleX(1f).scaleY(1f).setInterpolator(new AccelerateDecelerateInterpolator()).setDuration(300).start();
}
use of android.view.animation.AccelerateDecelerateInterpolator in project easy by MehdiBenmesa.
the class SplashActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_svg);
final PathView pathView = (PathView) findViewById(R.id.pathView);
final PathView pathView2 = (PathView) findViewById(R.id.pathView2);
pathView.getPathAnimator().delay(1000).duration(3500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {
@Override
public void onAnimationStart() {
}
}).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {
@Override
public void onAnimationEnd() {
Intent i = new Intent(SplashActivity.this, StartActivity.class);
startActivity(i);
finish();
}
}).interpolator(new AccelerateDecelerateInterpolator()).start();
pathView.useNaturalColors();
pathView.setFillAfter(true);
pathView2.getPathAnimator().delay(1000).duration(2500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {
@Override
public void onAnimationStart() {
}
}).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {
@Override
public void onAnimationEnd() {
}
}).interpolator(new AccelerateDecelerateInterpolator()).start();
pathView2.useNaturalColors();
pathView2.setFillAfter(true);
}
use of android.view.animation.AccelerateDecelerateInterpolator in project easy by MehdiBenmesa.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_svg);
final PathView pathView = (PathView) findViewById(R.id.pathView);
final PathView pathView2 = (PathView) findViewById(R.id.pathView2);
pathView.getPathAnimator().delay(1000).duration(3500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {
@Override
public void onAnimationStart() {
}
}).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {
@Override
public void onAnimationEnd() {
Intent i = new Intent(MainActivity.this, StartActivity.class);
startActivity(i);
finish();
}
}).interpolator(new AccelerateDecelerateInterpolator()).start();
pathView.useNaturalColors();
pathView.setFillAfter(true);
pathView2.getPathAnimator().delay(1000).duration(2500).listenerStart(new PathView.AnimatorBuilder.ListenerStart() {
@Override
public void onAnimationStart() {
}
}).listenerEnd(new PathView.AnimatorBuilder.ListenerEnd() {
@Override
public void onAnimationEnd() {
}
}).interpolator(new AccelerateDecelerateInterpolator()).start();
pathView2.useNaturalColors();
pathView2.setFillAfter(true);
}
use of android.view.animation.AccelerateDecelerateInterpolator in project PagerBottomTabStrip by tyzlmjj.
the class MaterialItemLayout method initialize.
/**
* 初始化方法
*
* @param items 按钮集合
* @param mode {@link MaterialMode}
*/
public void initialize(List<MaterialItemView> items, int mode) {
mItems = items;
//判断是否需要切换背景
if ((mode & MaterialMode.CHANGE_BACKGROUND_COLOR) > 0) {
//初始化一些成员变量
mChangeBackgroundMode = true;
mOvals = new ArrayList<>();
mColors = new ArrayList<>();
mInterpolator = new AccelerateDecelerateInterpolator();
mTempRectF = new RectF();
mPaint = new Paint();
//获取各项的选中颜色,并替换成白色
for (MaterialItemView v : mItems) {
mColors.add(v.getCheckedColor());
v.setCheckedColor(Color.WHITE);
}
//设置默认的背景
setBackgroundColor(mColors.get(DEFAULT_SELECTED));
} else {
//设置按钮点击效果
for (MaterialItemView v : mItems) {
v.setBackgroundResource(R.drawable.material_item_background);
}
}
//判断是否隐藏文字
if ((mode & MaterialMode.HIDE_TEXT) > 0) {
mShiftingMode = true;
for (MaterialItemView v : mItems) {
v.setShiftingMode(true);
}
}
//添加按钮到布局,并注册点击事件
int n = mItems.size();
for (int i = 0; i < n; i++) {
MaterialItemView v = mItems.get(i);
v.setChecked(false);
this.addView(v);
final int finali = i;
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setSelect(finali, mLastUpX, mLastUpY);
}
});
}
//默认选中第一项
mSelected = DEFAULT_SELECTED;
mItems.get(DEFAULT_SELECTED).setChecked(true);
}
Aggregations