public class MainActivity extends AppCompatActivity { //Variables Animation topAnim, bottomAnim; ImageView image; TextView logo, slogan; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View decorView = getWindow().getDecorView(); // Hide the status bar. int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; decorView.setSystemUiVisibility(uiOptions); setContentView(R.layout.activity_main); //Animations topAnim = AnimationUtils.loadAnimation(this,R.anim.top_animation); bottomAnim = AnimationUtils.loadAnimation(this,R.anim.bottom_animation); //Hooks image = findViewById(R.id.imageView); logo = findViewById(R.id.textView); slogan = findViewById(R.id.textView2); image.setAnimation(topAnim); logo.setAnimation(bottomAnim); slogan.setAnimation(bottomAnim); int SPLASH_SCREEN = 5000; new Handler().postDelayed(new Runnable() { @Override public void run() { Intent intent = new Intent(MainActivity.this, HomeActivity.class); startActivity(intent); finish(); } }, SPLASH_SCREEN); } }
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">#0347F4</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> </resources>
<item name="android:WindowLayoutInDisplayCutoutmode"shortEdges</item>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)