Hello Friends,
Today, I am going to share the tutorial of android splash screen with animation.
With help of this tutorial you can easily implement the facebook like splash screen
or skype like splash screen.
1. Create an Android Project "SplashScreen"
2. Create an folder "anim" inside the res folder
3. Create two file inside the "anim" folder
a. alpha.xml
b. translate.xml
4. inside your oncreate() called this method
Download the code : Android animate splash sreen
Hope this will help someone
Enjoy Coding.... :)
Today, I am going to share the tutorial of android splash screen with animation.
With help of this tutorial you can easily implement the facebook like splash screen
or skype like splash screen.
Android animated splash screen |
1. Create an Android Project "SplashScreen"
2. Create an folder "anim" inside the res folder
3. Create two file inside the "anim" folder
a. alpha.xml
<?xml version="1.0" encoding="utf-8"?> <alpha xmlns:android="http://schemas.android.com/apk/res/android" android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="3000" />
b. translate.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0%" android:toXDelta="0%" android:fromYDelta="900%" android:toYDelta="0%" android:duration="2000" android:zAdjustment="top" /> </set>
4. inside your oncreate() called this method
public class SpalshScreenActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); StartAnimations(); } ................ ................ }
private void StartAnimations() { Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha); anim.reset(); LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay); l.clearAnimation(); l.startAnimation(anim); anim = AnimationUtils.loadAnimation(this, R.anim.translate); anim.reset(); ImageView iv = (ImageView) findViewById(R.id.logo); iv.clearAnimation(); iv.startAnimation(anim); anim = AnimationUtils.loadAnimation(this, R.anim.translate); anim.reset(); LinearLayout l2 = (LinearLayout) findViewById(R.id.linear2); l2.setVisibility(View.VISIBLE); l2.clearAnimation(); l2.startAnimation(anim); }
Download the code : Android animate splash sreen
Hope this will help someone
Enjoy Coding.... :)
Thanks buddy. It is very helping for mine :)
ReplyDeletei'm going to develop a RESTAURANT billing application .
ReplyDeleteI don't know where to start please help me....
Very nice thank you!
ReplyDeletevery nice tutorial
ReplyDeleteThanks Preeto...
ReplyDeleteThanks Mukesh, thats help me to build splashscreen more better
ReplyDeleteIf only there are more C# android tutorials out there...
ReplyDeletewhat is other required layout or xml?
ReplyDeleteHello Amir,
DeleteI am not getting your point...what u want to implement?
please check complete code at below link
https://github.com/mukesh4u/AnimatdSplashScreen