Answers for "start activity from another activity"

1

start fragment from activity

FragmentManager manager = getFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.add(R.id.container,YOUR_FRAGMENT_NAME,YOUR_FRAGMENT_STRING_TAG);
transaction.addToBackStack(null);
transaction.commit();
Posted by: Guest on November-06-2020
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

Code answers related to "start activity from another activity"

Browse Popular Code Answers by Language