Answers for "how to call another activity in android?"

0

android start new Activity from an activity with a child

val newIntent = Intent(this@Activity1, Activity2::class.java)
newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

[email protected](newIntent)
Posted by: Guest on March-17-2021
0

navigate to another activity in android

OnClickListener onClickListener = new OnClickListener() {
    @Override
    public void onClick(View v) {
        startActivity(new Intent(action));
    }
};

Button button = (Button) findViewById(id);
button.setOnClickListener(onClickListener);
Posted by: Guest on July-13-2020
0

how to call same activity again in android

Intent i= new Intent(ActivityA.this,ActivityA.class);
Posted by: Guest on February-25-2021

Code answers related to "how to call another activity in android?"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language