Simple Splash Screen - Android

View: 70    Dowload: 0   Comment: 0   Post by: daii   Category: Mobile applications   Fields: Game - Entertainment

0 point/0 review File has been tested

Download  simple-splash-screen-android.zip (406.14 KB)

You need to Sign In to download the file simple-splash-screen-android.zip
If you do not have an account then Sign up for free here

In this tutorial we will try to create a Simple Splash Screen Using Android. Android is most commonly comes installed on a variety of smartphones and tablets, and even in TV. Android is an open source so that developer find it easy to develop and expand new features. So let's do the coding...

Getting Started:

First you will have to download & install the Android Development IDE (Android Studio or Eclipse). Android Studio is an open source development feel free to develop your things.

Here's the link for the Android Studio https://developer.android.com/studio/index.html.

Layout Design

We will now create the design for the application, first locate the activity_main.xml and click text to view the script. Then copy and paste the code below.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="<a href="http://schemas.android.com/apk/res/android"
  3. " rel="nofollow">http://schemas.android.com/apk/res/android"
  4. </a> xmlns:app="<a href="http://schemas.android.com/apk/res-auto"
  5. " rel="nofollow">http://schemas.android.com/apk/res-auto"
  6. </a> xmlns:tools="<a href="http://schemas.android.com/tools"
  7. " rel="nofollow">http://schemas.android.com/tools"
  8. </a> android:layout_width="match_parent"
  9. android:layout_height="match_parent"
  10. tools:context="com.razormist.simplesplashscreen.MainActivity">
  11.  
  12. <TextView
  13. android:id="@+id/tv_loading"
  14. android:layout_height="wrap_content"
  15. android:layout_width="wrap_content"
  16. android:text="LOADING"
  17. android:layout_centerInParent="true"
  18. android:layout_above="@+id/progressBar"
  19. android:textSize="50sp"/>
  20.  
  21. <ProgressBar
  22. android:id="@+id/progressBar"
  23. style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Horizontal"
  24. android:layout_width="match_parent"
  25. android:layout_height="wrap_content"
  26. android:progress="0"
  27. android:layout_centerVertical="true"
  28. android:layout_alignParentLeft="true"
  29. android:layout_alignParentStart="true" />
  30. </RelativeLayout>

Android Manifest File

The Android Manifest file provides essential information about your app to the Android system in which the system must required before running the code.

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="<a href="http://schemas.android.com/apk/res/android"
  3. " rel="nofollow">http://schemas.android.com/apk/res/android"
  4. </a> package="com.razormist.simplesplashscreen">
  5.  
  6. <application
  7. android:allowBackup="true"
  8. android:icon="@mipmap/ic_launcher"
  9. android:label="@string/app_name"
  10. android:roundIcon="@mipmap/ic_launcher_round"
  11. android:supportsRtl="true"
  12. android:theme="@style/AppTheme">
  13. <activity android:name=".MainActivity"
  14. android:configChanges="orientation"
  15. android:screenOrientation="portrait">
  16. <intent-filter>
  17. <action android:name="android.intent.action.MAIN" />
  18.  
  19. <category android:name="android.intent.category.LAUNCHER" />
  20. </intent-filter>
  21. </activity>
  22. </application>
  23.  
  24. </manifest>

The Main Function

This code contains the main function of the application. This code will start running the progress bar to it target point and will load the new page at the same time. To create first locate your java file and open it, then write these block of codes.

  1. package com.razormist.simplesplashscreen;
  2.  
  3. import android.os.Handler;
  4. import android.support.v7.app.AppCompatActivity;
  5. import android.os.Bundle;
  6. import android.widget.ProgressBar;
  7. import android.widget.TextView;
  8.  
  9. public class MainActivity extends AppCompatActivity {
  10. ProgressBar progressBar;
  11. TextView loading;
  12.  
  13. int progress = 0;
  14. Handler h = new Handler();
  15. @Override
  16. protected void onCreate(Bundle savedInstanceState) {
  17. super.onCreate(savedInstanceState);
  18. setContentView(R.layout.activity_main);
  19. progressBar = (ProgressBar)findViewById(R.id.progressBar);
  20. loading = (TextView)findViewById(R.id.tv_loading);
  21.  
  22. new Thread(new Runnable() {
  23. @Override
  24. public void run() {
  25. for(int i = 0; i < 5; i++){
  26. progress += 20;
  27. h.post(new Runnable() {
  28. @Override
  29. public void run() {
  30. progressBar.setProgress(progress);
  31. if(progress == progressBar.getMax()){
  32. progressBar.setVisibility(4);
  33. loading.setText("WELCOME");
  34. }
  35. }
  36. });
  37. try{
  38. Thread.sleep(3000);
  39.  
  40. }
  41. }
  42. }
  43. }).start();
  44. }
  45. }

Try to run the app and see if it worked.

There you have it we create a Simple Splash Screen using Android. I hope that this tutorial help you to what you are looking for. For more updates and tutorials just kindly visit this site. Enjoy Coding!!!

Simple Splash Screen - Android

Simple Splash Screen - Android Posted on 12-03-2018  In this tutorial we will try to create a Simple Splash Screen Using Android. Android is most commonly comes installed on a variety of smartphones and tablets, and even in TV. Android is an open source so that developer find it easy to develop and expand new features. So let's do the coding... 5/10 70

Comment:

To comment you must be logged in members.

Files with category

  • Beautiful and Simple Todo list iOS App

    Beautiful and Simple Todo list iOS App

    View: 15    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    TodoList is an iOS app for making todo lists. It uses core data to save the notes. The app is an excellent starting point to start learning iOS Application Development using swift and getting familiar with Model View Controller architecture. Liked...

  • E - Commerce

    E - Commerce

    View: 16    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    If you’re in a hurry, then E-Commerce App is the best option for you. Late delivery, cold food, no change, low quantity, or same old Dal or Pizza - we wanted to solve this madness for you. So we built a whole new App for you that is a single point to...

  • iSignUp - iOS 6 & Parse

    iSignUp - iOS 6 & Parse

    View: 18    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    Basic iOS 6 App created using Objective C & Parse as its Primary data storage..... Parse - ( www.parse.com ) *Features 1.basic C.R.U.D. Process 2.pushing from 1 UIViewController to other UIViewController 3.Populating/Fetching UITableView using...

  • UIAlertViews - iOS

    UIAlertViews - iOS

    View: 13    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    The UIAlertView class displays a blue popup box on the screen and the UIActionSheet causes a panel to slide up from the bottom of the screen.

  • iPhone with MapKit and the MKMapView Class

    iPhone with MapKit and the MKMapView Class

    View: 357    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    The MapKit Framework is based on the Apple Maps data and APIs and provides iPhone developers with a simple mechanism for integrating detailed and interactive mapping capabilities into any application. The core element of the MapKit framework from...

  • Upturn Task Reminder app

    Upturn Task Reminder app

    View: 27    Download: 1   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    Time management techniques say that it's better to keep track of tasks using a reminder system rather than your memory. Owing to intensive agenda, working person may have dozens of works and others tasks that should be done and it is normal that even...

  • Instagram Clone App (Android)

    Instagram Clone App (Android)

    View: 103    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    This is an Instagram Clone app for android phone. More information contact on: whatsapp :+918285672453 skype: nirbhay.success mail: nirbhayiise@gmail.com

  • Text To Speech Application in Android Eclipse (Pronunciation Made Easy App)

    Text To Speech Application in Android Eclipse (Pronunciation Made Easy App)

    View: 242    Download: 0   Comment: 0

    Category: Mobile applications     Fields: Game - Entertainment

    This Android application entitled Pronunciation Made Easy was programmed by my younger brother as his project for their mobile application development subject. This application aims to help individuals who have difficulties or questions on how to...

 
File suggestion for you
File top downloads
Codetitle.net - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.net Develope by Vinagon .Ltd