本文整理了Java中android.view.animation.Animation.startNow()
方法的一些代码示例,展示了Animation.startNow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.startNow()
方法的具体详情如下:
包路径:android.view.animation.Animation
类名称:Animation
方法名:startNow
暂无
代码示例来源:origin: Tencent/RapidView
public void run(AnimationObject object, Object animation, String value){
((Animation)animation).startNow();
}
}
代码示例来源:origin: stackoverflow.com
private void startAnimations() {
// Transition from Splash screen to Main Menu screen
Animation fade2 = AnimationUtils.loadAnimation(this, R.anim.fade_in2);
fade2.setAnimationListener(new AnimationListener() {
public void onAnimationEnd(Animation animation)
{
startActivity(new Intent(MainActivity.this,QuizMenuActivity.class));
MainActivity.this.finish();
}
public void onAnimationStart(Animation animation)
{
//Nothing
}
public void onAnimationRepeat(Animation animation)
{
//Nothing
}
});
fade2.startNow();
}
代码示例来源:origin: qiubiteme/android_api_demos
public SampleView(Context context) {
super(context);
setFocusable(true);
setFocusableInTouchMode(true);
Drawable dr = context.getResources().getDrawable(R.drawable.beach);
dr.setBounds(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight());
Animation an = new TranslateAnimation(0, 100, 0, 200);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);
mDrawable = new AnimateDrawable(dr, an);
an.startNow();
}
代码示例来源:origin: THEONE10211024/ApiDemos
public SampleView(Context context) {
super(context);
setFocusable(true);
setFocusableInTouchMode(true);
Drawable dr = context.getResources().getDrawable(R.drawable.beach);
dr.setBounds(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight());
Animation an = new TranslateAnimation(0, 100, 0, 200);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);
mDrawable = new AnimateDrawable(dr, an);
an.startNow();
}
代码示例来源:origin: stackoverflow.com
public class MovingBGView extends View {
private AnimateDrawable mDrawable;
public MovingBGView(Context context) {
super(context);
setFocusable(true);
setFocusableInTouchMode(true);
Drawable dr = context.getResources().getDrawable(R.drawable.colombo);
dr.setBounds(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight());
Animation an = new TranslateAnimation(0, 100, 0, 200);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);
mDrawable = new AnimateDrawable(dr, an);
an.startNow();
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawColor(Color.WHITE);
mDrawable.draw(canvas);
invalidate();
}
}
代码示例来源:origin: guardianproject/Ripple
animation.startNow();
view.setAnimation(set);
代码示例来源:origin: ywwynm/EverythingDone
public void showContextualToolbar(boolean anim) {
Toolbar tb = mContextualToolbar;
tb.setTitleTextAppearance(mApp, R.style.ContextualToolbarText);
tb.setNavigationIcon(R.drawable.act_close);
tb.setNavigationOnClickListener(backNormalModeListener);
tb.setOnMenuItemClickListener(mContextualListener);
int limit = mApp.getLimit();
if (limit <= Def.LimitForGettingThings.GOAL_UNDERWAY) {
tb.inflateMenu(R.menu.menu_contextual_underway);
} else if (limit == Def.LimitForGettingThings.ALL_FINISHED) {
tb.inflateMenu(R.menu.menu_contextual_finished);
} else {
tb.inflateMenu(R.menu.menu_contextual_deleted);
}
RelativeLayout rl = mRlContextualToolbar;
rl.setVisibility(View.VISIBLE);
if (anim) {
rl.setAnimation(showContextualToolbar);
showContextualToolbar.startNow();
}
mRecyclerView.postDelayed(hideActionBarShadowRunnable, 200);
}
内容来源于网络,如有侵权,请联系作者删除!