Splash screen in android studio how to create splash screen android studio beginner tutorials

Splash screen in android studio how to create splash screen android studio beginner tutorials




Full tutorial is given below. Dear Viewer we are working hard to maintain this website. We doesn’t want any think from you. Its just a humble request If you thinks that this posts helps you please share this post with your friends.



Activity.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">


<ImageView
android:id="@+id/imageView"
android:layout_centerInParent="true"
android:background="@drawable/icon"
android:layout_width="300sp"
android:layout_height="350sp"
/>


<Space
android:id="@+id/space"
android:layout_below="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="30sp" />

<ProgressBar
android:id="@+id/progressBar"
android:layout_below="@+id/space"
android:layout_width="match_parent"
android:layout_centerInParent="true"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/text"
android:layout_above="@+id/space1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Developed By usmsof.com and shared by usmtip.com"
android:textColor="@color/black"
android:layout_centerHorizontal="true"
/>

<Space
android:id="@+id/space1"

android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="10dp"
android:layout_alignParentBottom="true"
/>


</RelativeLayout>

Activity.java

package com.usmsof.threethousandssonerename;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class MainActivity extends AppCompatActivity {

private static int SPLASH_TIME_OUT = 2000;



@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);


new Handler().postDelayed(new Runnable() {
public void run() {
MainActivity.this.startActivity(new Intent(MainActivity.this, HomeActivity.class));
MainActivity.this.finish();
}
},SPLASH_TIME_OUT);
}
}












All Server Links to Download This File:



Previous Post
Next Post

post written by:

0 Comments: