Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android java back button closeapp

public void onBackPressed(){
Intent a = new Intent(Intent.ACTION_MAIN);
a.addCategory(Intent.CATEGORY_HOME);
a.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(a);
}
Comment

PREVIOUS NEXT
Code Example
Java :: java set textview style 
Java :: java decompiler 
Java :: greater than sign in java 
Java :: watch service java 
Java :: regex pattern for bank cards validation 
Java :: check first character of string is number java 
Java :: download File java from website 
Java :: file java class 
Java :: how to check number format exception in java 
Java :: java substring based on delimiter 
Java :: java date add hours 
Java :: how to use do while loop in java 
Java :: export JAVA_HOME=` mac 
Java :: remove duplicate from string 
Java :: Conversion from Java List to Array 
Java :: lambda java 
Java :: swing getsource 
Java :: how to set context path in spring boot 
Java :: java.lang.IllegalArgumentException: View=DecorView@5fd145b[MainActivity] not attached to window manager 
Java :: java swing get frame size 
Java :: get date from calendar java 
Java :: android studio remove button onclick 
Java :: findone in spring boot 2.4.1 
Java :: can i have both java7 and java 11 in mac 
Java :: print all numbers from 1 to n java 
Java :: get all enum values java 
Java :: java remove item from list 
Java :: traversing treemap in java 
Java :: java method parameters 
Java :: debug cxf 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =