当前位置: 首页>>代码示例>>Java>>正文


Java TimeAnimator.setTimeListener方法代码示例

本文整理汇总了Java中android.animation.TimeAnimator.setTimeListener方法的典型用法代码示例。如果您正苦于以下问题:Java TimeAnimator.setTimeListener方法的具体用法?Java TimeAnimator.setTimeListener怎么用?Java TimeAnimator.setTimeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.animation.TimeAnimator的用法示例。


在下文中一共展示了TimeAnimator.setTimeListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createJBRunnable

import android.animation.TimeAnimator; //导入方法依赖的package包/类
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mDownTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}
 
开发者ID:openresearch,项目名称:android-chromium-view,代码行数:20,代码来源:GenericTouchGesture.java

示例2: createJBRunnable

import android.animation.TimeAnimator; //导入方法依赖的package包/类
private Runnable createJBRunnable() {
    // On JB, we rely on TimeAnimator to send events tied with vsync.
    return new Runnable() {
        @Override
        public void run() {
            mTimeAnimator = new TimeAnimator();
            mTimeAnimator.setTimeListener(new TimeListener() {
                @Override
                public void onTimeUpdate(TimeAnimator animation, long totalTime,
                        long deltaTime) {
                    if (!sendEvent(mStartTime + totalTime)) {
                        mTimeAnimator.end();
                    }
                }
            });
            mTimeAnimator.start();
        }
    };
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:20,代码来源:GenericTouchGesture.java

示例3: init

import android.animation.TimeAnimator; //导入方法依赖的package包/类
private void init(Context context) {
    animator = new TimeAnimator();
    animator.setTimeListener(this);

    paint = new Paint();
    paint.setColor(Color.WHITE);

    density = getResources().getDisplayMetrics().density;

    path = new Path();
    pathMeasure = new PathMeasure();
    position = new PointF();
    velocity = new PointF();
}
 
开发者ID:justasm,项目名称:Bugstick,代码行数:15,代码来源:BugView.java

示例4: SystemClockManager

import android.animation.TimeAnimator; //导入方法依赖的package包/类
public SystemClockManager(SystemClockListener listener, long resolution) {
	mListener = listener;
	mResolution = resolution;

	mAnimator = new TimeAnimator();
	mAnimator.setTimeListener(this);
}
 
开发者ID:dgmltn,项目名称:android-MorphClock,代码行数:8,代码来源:SystemClockManager.java

示例5: onCreate

import android.animation.TimeAnimator; //导入方法依赖的package包/类
@Override
@SuppressLint("NewApi")
protected void onCreate(Bundle savedInstanceState)
{
  super.onCreate(savedInstanceState);
  setContentView(R.layout.property_animations09);

  if (android.os.Build.VERSION.SDK_INT >= 19)
  {
    ImageView someImage = (ImageView) findViewById(R.id.some_image);

    ObjectAnimator rotateAnim = ObjectAnimator.ofFloat(someImage, "rotation", 0, 360);
    rotateAnim.setDuration(1000);
    rotateAnim.setRepeatCount(5);
    rotateAnim.setRepeatMode(ObjectAnimator.RESTART);

    fpsText = (TextView) findViewById(R.id.fps_text);
    FpsTimeListener listener = new FpsTimeListener(fpsText);
    
    final TimeAnimator timeAnim = new TimeAnimator();
    timeAnim.setTimeListener(listener);
    
    anim = new AnimatorSet();
    anim.play(rotateAnim).with(timeAnim);
    rotateAnim.addListener(new AnimatorListenerAdapter()
    {
      @Override
      public void onAnimationEnd(Animator animation)
      {
        timeAnim.end(); 
      }
    });
  }
}
 
开发者ID:mikailsheikh,项目名称:cogitolearning-examples,代码行数:35,代码来源:PropertyAnimation09.java

示例6: Bouncer

import android.animation.TimeAnimator; //导入方法依赖的package包/类
public Bouncer(Context context, AttributeSet attrs, int flags) {
    super(context, attrs, flags);
    mAnimator = new TimeAnimator();
    mAnimator.setTimeListener(this);
}
 
开发者ID:NightscoutFoundation,项目名称:xDrip,代码行数:6,代码来源:XDripDreamService.java


注:本文中的android.animation.TimeAnimator.setTimeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。