Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

activity as a splash screen java code

 /****** Create Thread that will sleep for 5 seconds****/  		
          Thread background = new Thread() {
           public void run() {
              try {
		// Thread will sleep for 5 seconds
		sleep(5*1000);
					
		// After 5 seconds redirect to another intent
		 Intent i=new Intent(getBaseContext(),FirstScreen.class);
		  startActivity(i);
					
		//Remove activity
		finish();
               } catch (Exception e) {
				}
                            }
		        };
		// start thread
		background.start();
Comment

PREVIOUS NEXT
Code Example
Java :: spring context xml definition 
Java :: java elapsedTime 
Java :: random processing 
Java :: internet permission android 
Java :: fullscreen java jframe 
Java :: get long from date java 
Java :: pytho count avro file 
Java :: java read last line of file 
Java :: round bg android 
Java :: java get random index from array 
Java :: long to int java 8 
Java :: error when making java variable 
Java :: java string to int 
Java :: how to iterate a stack without iterator class 
Java :: execute application jar 
Java :: text before dot java 
Java :: regex validation for special characters in java 
Java :: repeat password in joi 
Java :: file to multipartfile in java 
Java :: int a=08 java 
Java :: How to efficiently find the middle node of a singly linked list, in Java? 
Java :: check last character of string java 
Java :: 2 power 8 in java 
Java :: android java optional arguments 
Java :: module-info.java module not found 
Java :: java string array add element 
Java :: how to play audio files java 
Java :: linked list sorting in java 
Java :: how to import java.util 
Java :: is prime java 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =