【发布时间】:2015-08-24 15:30:42
【问题描述】:
这是我需要制作的动画: https://www.dropbox.com/s/xvyj550i43gg6wz/2015-08-24%2013.12.57.mp4?dl=0 我开始研究它,使用 Leonids 库: https://github.com/plattysoft/Leonids 现在我创建了一个particleSystem 创建器,并将它设置在我的发射器上,但应用程序将始终从屏幕的0,0(左上角)点开始飞溅粒子。 我怎样才能让它从我的视野中发出? 这就是我启动它的方式:
new ParticleSystem(PSHiscoreAnimationActivity.this, 1000, R.drawable.icn_planning_dot, 10000)
.setAcceleration(0.00013f, 90)
.setSpeedByComponentsRange(0f, 0f, 0.05f, 0.1f)
.setFadeOut(200, new AccelerateInterpolator())
.emitWithGravity(emitter, Gravity.BOTTOM, 30);
这是我的布局:
<View android:id="@+id/emitter"
android:layout_centerInParent="true"
android:background="@color/blue"
android:layout_width="10dp"
android:layout_height="10dp" />
【问题讨论】:
-
不要包含您在得到答案后有意删除的链接
标签: android animation ondraw particles particle-system