Can activity B begin within activity? And How?

ActivityA is the main visible activity. I want to start activityB inside activityA . And create activityB in FrameLayout (or something like that) activityA . Is it possible? And How?

+3
source share
1 answer

Yes, you can use ActivityGroupand paste it there.

http://developer.android.com/reference/android/app/ActivityGroup.html

public class ActivityA extends ActivityGroup {

    ...
    Intent b = new Intent(this, ActivityB.class);
    Window bWindow = getLocalActivityManager().startActivity(ActivityB.class.getName(),b);
    activityFrame.addView(bWindow.getDecorView());  // activityFrame being your FrameLayout
    ....
+4
source

Source: https://habr.com/ru/post/1772615/


All Articles