Splash Screen for Multi Webview App. || Part – 01 || with [ Java Language ].

We must create a new splash screen layout Android app source code for our new Multi Webview App so if you agree to copy this code, paste it into your project for creating a new one. Now we have some latest code for making this layout for our app splash screen given below.

Step 01:

Copy all string codes for making this project are given below.

<string name="developed_by_click2code">Developed by: <b>CLICK2CODE</b></string>
<string name="website_title">Website Title</string>

<!-- Navigation Menu Items -->
<string name="more_apps">Visit More Apps</string>
<string name="rate_this_app">Rate this Application</string>
<string name="communication">Communication</string>
<string name="share">Share</string>
<string name="disclaimer">Disclaimer</string>
<string name="privacy_policy">Privacy Policy</string>
<string name="terms_conditions"><![CDATA[Terms & Conditions]]></string>

<!-- Drawer Layout Items -->
<string name="drawer_open">Drawer Open</string>
<string name="drawer_close">Drawer Close</string>

<!-- Navigation Menu Links -->
<string name="text_plain">text/plain</string>
<string name="AppDescription"><b>Multi WebView Template</b> : के तहत जो भी लिस्ट निकलता है उसका सभी विवरण यंहा तत्काल अपलोड कर दिया जाता है , <b>Download</b> करें इस Application को और अपने सुविधा अनुसार उपयोग करें ! </string>
<string name="AppLink"><![CDATA[https://play.google.com/store/apps/details?id=com.nilkanthpawan.nilkanthpawan&hl=en]]></string>
<string name="sub_here">Your Subject Here</string>
<string name="shareUsing">Share using</string>
<string name="packageDetails">market://details?id=</string>
<string name="packageDetail">http://play.google.com/store/apps/details?id=</string>
<string name="privacyLink">https://nilkanthpawanapps.blogspot.com/2022/02/privacy-policy-nilkanth-pawan-built.html</string>
<string name="termsLink">https://nilkanthpawanapps.blogspot.com/2022/02/terms-conditions-by-downloading-or.html</string>
<string name="developerApps">https://play.google.com/store/apps/developer?id=pub:SLPPSAJ+Studio</string>
<string name="DeveloperApp"><![CDATA[market://search?q=pub:SLPPSAJ+Studio&c=apps]]></string>
<string name="refresh">Refresh</string>

<!-- Disclaimer Layout Links Below -->
<string name="email_id">Email Us:</string>
<string name="emailId">nilkanthpawan@gmail.com</string>
<string name="about_disclaimer">Content presented in this app is collected from the Internet. We do not have any right of any kind on this materials and we invalidate all types of realities about this material.\nIf you have any personal ownership rights on any of the content shown in the application than you can inform us by sending an E-mail to given below with proof of ownership/authority.\nWe will check the validity of your claim doing so will remove content immediately.</string>
<string name="about_disclaimer_short">We just provide Numbers for your help purpose. We are not responsible.\nIf any issue please contact to owner of website.</string>
<string name="version_name">V-1.1.0</string>

<!-- All WebView Links Given Below -->
<string name="one_link">https://eshram.gov.in/</string>
<string name="two_link">https://pmaymis.gov.in/Open/Find_Beneficiary_Details.aspx</string>
<string name="three_link">https://rhreporting.nic.in/netiay/SECCReport/report_categorywiseseccverification.aspx/</string>
<string name="four_link">https://rhreporting.nic.in/netiay/benificiary.aspx</string>
<string name="five_link">https://pmaymis.gov.in/</string>
<string name="six_link">https://pmaymis.gov.in/Open/Find_Beneficiary_Details.aspx</string>
<string name="seven_link">https://pmaymis.gov.in/Track_Application_Status.aspx</string>
<string name="eight_link">http://sbm.gov.in/sbmReport/Report/Physical/SBM_TargetVsAchievementWithout1314.aspx</string>
<string name="nine_link">https://www.india.gov.in/hi/spotlight/%E0%A4%AA%E0%A5%8D%E0%A4%B0%E0%A4%A7%E0%A4%BE%E0%A4%A8%E0%A4%AE%E0%A4%82%E0%A4%A4%E0%A5%8D%E0%A4%B0%E0%A5%80-%E0%A4%89%E0%A4%9C%E0%A5%8D%E0%A4%9C%E0%A4%B5%E0%A4%B2%E0%A4%BE-%E0%A4%AF%E0%A5%8B%E0%A4%9C%E0%A4%A8%E0%A4%BE#tab=tab-1</string>
<string name="ten_link">https://mnregaweb2.nic.in/netnrega/dynamic_account_details_ippe.aspx</string>
<string name="eleven_link">https://nrega.nic.in/netnrega/HomeGP.aspx</string>
<string name="twelve_link">https://nsap.nic.in/</string>
<string name="thirteen_link">https://egramswaraj.gov.in/actionPlanReportForGP.do</string>
<string name="fourteen_link">https://pmkisan.gov.in/</string>
<string name="fifteen_link">http://mnregaweb4.nic.in/netnrega/workers/wrkinfo.aspx</string>
<string name="sixteen_link">https://pmkisan.gov.in/BeneficiaryStatus.aspx</string>
<string name="seventeen_link">https://pmkisan.gov.in/Rpt_BeneficiaryStatus_pub.aspx</string>
<string name="eighteen_link">https://pmkisan.gov.in/FarmerStatus.aspx</string>
<string name="nineteen_link">https://pmkisan.gov.in/aadharekyc.aspx</string>
<string name="twenty_link">https://pmkisan.gov.in/SearchSelfRegisterfarmerDetailsNew.aspx</string>

Step 02:

Create all app color codes are given below:

<color name="purple_200">#FF5722</color>
<color name="purple_500">#FF5722</color>
<color name="purple_700">#FF5722</color>
<color name="teal_200">#FF5722</color>
<color name="teal_700">#FF5722</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="colorGray">#B6B6B6</color>
<color name="yellow">#FFC107</color>
<color name="green">#019E07</color>
<color name="orange">#FF511A</color>
<color name="blue">#033BE3</color>

Step 03:

Change Dark Action Bar to No Action Bar in the Theme file.

Theme.MaterialComponents.DayNight.NoActionBar

Step 04:

Now, Import LottieFile Dependency in the “Gradle” File.

// Dependency Lottie Effect
implementation "com.airbnb.android:lottie:6.5.1"

Step 05:

Create a Splash Screen animation codes are given below.

<?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="1800">

</alpha>

Step 06:

If you want to download the Splash Screen Animation file then click below download button below to download these codes.

Get the Latest animation file for a splash screen only.

Step 07:

Now If you want to use our app icon then you have to download the below button.

Get the Latest app icon for testing purposes only.

Step 08:

Create a screen background code and fit layout codes.

android:background="@color/white"
android:fitsSystemWindows="true"

Step 09:

Create an ImgaeView code for showing the logo on the splash screen.

<ImageView
android:id="@+id/logo"
android:layout_width="240dp"
android:layout_height="240dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.28" />

Step 10:

Create a splash screen loading progress bar in this project.

<ProgressBar
android:id="@+id/progressBar"
android:layout_width="32dp"
android:layout_height="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo"
app:layout_constraintVertical_bias="0.5" />

Step 11:

Create the developer name at the bottom of the splash screen.

<TextView
android:id="@+id/developedBy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:text="@string/developed_by_click2code"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/progressBar"
app:layout_constraintVertical_bias="1" />

Step 12:

First, we remove unwanted code then we have to import all splash screen code in the “MainActivity” file. Now connect all XML layouts with the JAVA file.

ImageView imageView = findViewById(R.id.logo);
ProgressBar progressBar = findViewById(R.id.progressBar);
TextView textView = findViewById(R.id.developedBy);

Now, we use a Handler with post delay to move one Activity to another Activity.

int splashTimeOut = 2500;
new Handler().postDelayed(() -> {
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(intent);
finish();

}, splashTimeOut);

Now, apply an animation system to show attractiveness for the splash screen.

Animation animation = AnimationUtils.loadAnimation(this, R.anim.splash_screen_animation);
imageView.startAnimation(animation);
progressBar.startAnimation(animation);
textView.startAnimation(animation);
Scroll to Top