Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

intent in fragment android

Button button = (Button) rootView.findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        Intent intent = new Intent(getActivity(), AnotherActivity.class);
        startActivity(intent);
    }
});
Comment

intent android

Intent intent = new Intent(MainActivity.this,MainActivity2.class);
 intent.putExtra("key",value);
 startActivity(intent);
////////////////////
 String string =getIntent().getStringExtra("key");  
Comment

PREVIOUS NEXT
Code Example
Java :: android studio go to another activity kotlin 
Java :: groovy ternary operator short form 
Java :: 64 encode java 
Java :: java selenium send keys integer 
Java :: android create snackbar 
Java :: how to control clip volume java 
Java :: gradle reflections 
Java :: how to convert a collection to array in java 
Java :: arraylist java 
Java :: toast no android 
Java :: check if string contains only letters java 
Java :: how to call intent in adapter class in android 
Java :: date format android 
Java :: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException 
Java :: java array to string 
Java :: Android dark theme programmatically 
Java :: sqlexception 
Java :: How to create a popup window (PopupWindow) in Android 
Java :: Do not concatenate text displayed with setText. Use resource string with placeholders. 
Java :: java to check if its a number scanner 
Java :: java for 
Java :: java thread dump 
Java :: java get all directories in path 
Java :: check if string is uuid 
Java :: Hourglass Java 
Java :: java copy file 
Java :: spannable string in android java for color 
Java :: How to find the prime factors of a number in Java? 
Java :: java replace first occurrence of substring 
Java :: jtable get get row 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =