這是我需要做動畫: https://www.dropbox.com/s/xvyj550i43gg6wz/2015-08-24%2013.12.57.mp4?dl=0 我開始做這個工作,用獅子座流星雨庫: https://github.com/plattysoft/Leonids 現在我做一個粒子系統的創造者,我將其設置在我的發射器上,但應用程序將始終從屏幕的0,0(左上角)點開始飛濺粒子。 我如何讓它從我的視野中散發出來? 這是我如何啓動它:我需要做一個粒子動畫,但顆粒總是從像素開始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" />
不要包含你一旦得到你的意圖就刪除的鏈接回答 – gregoiregentil