80772

Is it possible to start activityB inside activityA? And how?

Question:

<strong>ActivityA</strong> is main visible activity. I want to start <strong>activityB</strong> inside <strong>activityA</strong>. And build <strong>activityB</strong> in <em>FrameLayout</em> (or something like that) of <strong>activityA</strong>. Is it possible? And how?

Answer1:

Yes, you can use an ActivityGroup and embedded it in there.

<a href="http://developer.android.com/reference/android/app/ActivityGroup.html" rel="nofollow">http://developer.android.com/reference/android/app/ActivityGroup.html</a>

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 ....

Recommend

  • How to start an activity in a tab?
  • Set LayoutParams on parentless LinearLayout
  • Flash screen Android
  • How to set HtmlEditorExtender's content server-side
  • Attaching a fixed, transparent, header to a ListView?
  • Force a controller to always act as a proxy to a model in Ember
  • Ruby Mixins and Instance variables
  • Dynamically Impersonate a remote user - c# and asp.net
  • Float Label hint (TextInputLayout) not works with Android Data Binding
  • Delphi Chromium Embedded - Clear browser cache
  • addressing in assembler
  • Is there a way to link a linux's thread TID and a pthread_t “thread ID”
  • Accessing another variable in the same class with a click event
  • Why can't UI components be accessed from a backgroundworker?
  • CSS bleed-through with cfinput type=“datefield”
  • Possible to get mouse events fired when cursor is outside page?
  • How to getText() from the input field of an angularjs Application
  • How to access culture data in globalize.js V1.0.0
  • CakePHP 2.0.4 - findBy magic methods with conditions
  • Xcode 4 NSLog Macro link in Xcode 3
  • Disable Enter in editText android
  • Cannot resolve symbol 'MyApi'
  • Asynchronous UI Testing in Xcode With Swift
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Why is an OPTIONS request sent to the server?
  • output of program is not same as passed argument
  • Convert array of 8 bytes to signed long in C++
  • Release, debug version and Authorization Google?
  • Font Awesome Showing Box instead of Icons
  • Akka Routing: Reply's send to router ends up as dead letters
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • -fvisibility=hidden not passed by compiler for Debug builds
  • Turn off referential integrity in Derby? is it possible?
  • unknown Exception android
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • JaxB to read class hierarchy
  • Checking variable from a different class in C#
  • Net Present Value in Excel for Grouped Recurring CF