private void initView() {
// tv = (MarqueTextView) findViewById(R.id.tv_marque);
// Timer timer = new Timer();
// TimerTask task = new TimerTask() {
// @Override
// public void run() {
// index ++;
// if (index > 2) {
// index = 0;
// }
// MainActivity.this.runOnUiThread(new Runnable() {
// @Override
// public void run() {
// tv.setText(names[index]);
// }
// });
//
// }
// };
// timer.schedule(task,1000,1000);
findViewById(R.id.iv_head).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.e("aaaa","onclick");
// v.animate().setDuration(1000).scaleX(2).scaleY(2).setInterpolator(new BounceInterpolator()).start();
AnimatorSet set = new AnimatorSet();
set.setInterpolator(new AnticipateInterpolator());
set.playTogether(
ObjectAnimator.ofFloat(v,"scaleX",1f,2f),
ObjectAnimator.ofFloat(v,"scaleX",2f,1f),
ObjectAnimator.ofFloat(v,"scaleY",1f,2f),
ObjectAnimator.ofFloat(v,"scaleY",2f,1f));
set.setDuration(1000).start();
}
});
}
MainActivity.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:TanTanPaneView
作者:
评论列表
文章目录