属性动画
来源:互联网 发布:算法 中文版 pdf 编辑:程序博客网 时间:2024/06/08 12:47
public class MainActivity extends AppCompatActivity { private ImageView img; private Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); if(msg.what == 1){ Intent intent = new Intent(MainActivity.this,ShopActivity.class); startActivity(intent); finish(); } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); img = findViewById(R.id.img); ObjectAnimator animator1 = ObjectAnimator.ofFloat( img, "translationY", 0, 400 ); ObjectAnimator animator2 = ObjectAnimator.ofFloat( img, "alpha", 0, 1 ); ObjectAnimator animator3 = ObjectAnimator.ofFloat( img, "scaleY", 1, 2 ); ObjectAnimator animator4 = ObjectAnimator.ofFloat( img, "rotationY", 0, 360 ); AnimatorSet animatorSet = new AnimatorSet(); animatorSet.setDuration(3000); animatorSet.play(animator1) .with(animator2) .with(animator3) .with(animator4); animatorSet.start(); new Thread(){ @Override public void run() { super.run(); Message msg = new Message(); msg.what = 1; handler.sendMessageDelayed(msg,3000); } }.start();}}
阅读全文
0 0
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 属性动画
- 驼峰命名法与数据库下划线命名的字符串快速转化,方便操作数据
- synchronizing script resources with Tern server
- loj117 有源汇有上下界最小流
- laravel 验证码
- 【hdu1059】多重背包部分和
- 属性动画
- 单链表
- 仿京东购物车
- 【BZOJ1096】球形空间产生器
- 解决AndroidStudio导入项目在 Building gradle project info 一直卡住
- 使用“哨兵”减小时间复杂度
- [UnityEditor基础]脚本自动定位选择Hierarchy或Project下的对象
- web返回固定页面
- mobile and web message.pdf 英文原版 免费下载