Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

open a new activity on click of a button

Button btn = (Button)findViewById(R.id.open_activity_button);    

btn.setOnClickListener(new View.OnClickListener() {         
        @Override
        public void onClick(View v) {
            startActivity(new Intent(MainActivity.this, MyOtherActivity.class));
        }
});
Comment

PREVIOUS NEXT
Code Example
Java :: java swing absolute position 
Java :: in a junit test how test if empty list is returned 
Java :: how to build a java main menu 
Java :: print 2d array in java 
Java :: java intercept ctrl c 
Java :: programmation android avoir acces à la liste des instants de partage 
Java :: how to find smallest number in array java 
Java :: discord jda remove @everyone from channel 
Java :: install java 11 jdk raspberry pi 
Java :: create map java 
Java :: array ausgeben java 
Java :: java button actionlistener 
Java :: java sha256 hex digest 
Java :: print colored text java 
Java :: PlatformException (PlatformException(error, Neither user 10024 nor current process has android.permission.WAKE_LOCK., null, java.lang.SecurityException: Neither user 10024 nor current process has android.permission.WAKE_LOCK. 
Java :: java ee check if session exists or is new 
Java :: java button 
Java :: java for range loop 
Java :: spring enable cors 
Java :: sreekanth kasani 
Java :: java load .json file 
Java :: java doreturn void 
Java :: how to move from one activity to another in android studio on button click 
Java :: java.lang.Long cannot be cast to java.lang.Integer 
Java :: how to convert an ascii number to character in java 
Java :: how to make an activity default in android studio 
Java :: java 2d array loop 
Java :: how to print array 
Java :: isinstance java 
Java :: print random from list java 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =