Answers for "use intent in java and android"

9

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);
    }
});
Posted by: Guest on June-15-2020
0

intent in java

An intent is to perform an action on the screen. 
  It is mostly used to start activity, send broadcast receiver,start services 
 and send message between two activities.
  There are two intents available in android as Implicit Intents and 
  Explicit Intents.
Posted by: Guest on January-24-2022

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language