Hey Everyone in this Android tutorial I am sharing with you how to create an animation in android it is very easy and awesome you can follow just some step for Android splash screen awesome UI design lets start on a project .
Step 1:- to Start Android Studio
Step 2 :- To Create a New Project Project Click On ==> File ==> NEW ==>New Project. And Create an Activity in your project.
Step 3:- Add dependencies in your app base build. Gradle
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:28.+' compile 'com.android.support:design:28.+' compile 'com.android.support:support-v4:28.+' compile 'com.github.wailbabou:Splasher:0.1.2' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' }
Step 4:- Open your java class and add this code.
public class SpleshScreenActivity extends SplasherActivity { @Override public void initSplasher(SplasherConfig config) { config.setReveal_start(Const.START_CENTER) //--------------- .setAnimationDuration(3000) //--------------- .setLogo(R.drawable.logo_ic) .setLogo_animation(Techniques.BounceIn) .setAnimationLogoDuration(5000) .setLogoWidth(400) //--------------- .setTitle("Codeplayon.com") .setTitleColor(Color.parseColor("#ffffff")) .setTitleAnimation(Techniques.Bounce) .setTitleSize(30) //--------------- .setSubtitle("Learn , Explore and Share") .setSubtitleColor(Color.parseColor("#ffffff")) .setSubtitleAnimation(Techniques.FadeIn) .setSubtitleSize(20) //--------------- .setSubtitleTypeFace(Typeface.createFromAsset(getAssets(),"diana.otf")) .setTitleTypeFace(Typeface.createFromAsset(getAssets(),"stc.otf")); //Example of custom view .. // config.setCustomView(R.layout.custom_view) // .setReveal_start(Const.START_CENTER) // .setAnimationDuration(5000); // getCustomView().findViewById(R.id.textView); } @Override public void onSplasherFinished() { Toast.makeText(this, "Go to the next activity", Toast.LENGTH_SHORT).show(); Intent intent=new Intent(SpleshScreenActivity.this,LogInActivity.class); startActivity(intent); finish(); } }
thanks for reads us reads more solution and design in android hurryyyyy.