Animated Splash Screen ParticaleView In android ?
Step1. Add Repositories inside Build.gradle(Module
app).
repositories { maven { url 'https://dl.bintray.com/wangyuwei/maven' } }
Step2. Add the dependencies.
dependencies { compile 'me.wangyuwei:ParticleView:1.0.4' }
Step3. Create layout
and Add the ParticaleView .
xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:pv="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@android:color/holo_red_light"> <me.wangyuwei.particleview.ParticleView android:layout_width="match_parent" android:layout_height="match_parent" pv:pv_background_color="#ffffff" pv:pv_host_text="ANDROIDBEGINNERPOINT" pv:pv_host_text_size="34sp" pv:pv_particle_text=".blogspot.in" pv:pv_particle_text_size="34sp" pv:pv_text_color="#5dad70" pv:pv_text_anim_time="3000" pv:pv_spread_anim_time="2000" pv:pv_host_text_anim_time="3000" android:id="@+id/vimxcn"/> </LinearLayout>
.............................................................................................................................................................
Step4. Create
MainActivity java class and find the Particale View.
public class MainActivity extends AppCompatActivity { ParticleView Mview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Mview=(ParticleView)findViewById(R.id.vimxcn);
//StartAnim method Initialize… Mview.startAnim(); } }
..................................................................................................
try this code....
0 comments