Monday, September 6, 2010

[android-developers] Re: Activity inside a view

Thanks a lot. That solves my problem.

On Sep 6, 6:49 pm, a1 <arco...@gmail.com> wrote:
> > Does anyone has a simple example of to use LocalActivityManager or
> > something else to meet my requirements.
>
> void createInnerActivity(ViewGroup container, Class<?> activityClass)
> {
>         if (container.getChildCount() != 0) {
>             container.removeViewAt(0);
>         }
>
>         final Intent intent = new Intent(this, activityClass);
>         final Window window =
> getLocalActivityManager().startActivity(activityClass.toString(),
> intent);
>         container.addView(window.getDecorView(), new
> ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
>                 ViewGroup.LayoutParams.FILL_PARENT));
>
> }
>
> Above should be a method of activity that extends ActivityGroup,
> passed container will host newly created activity.
>
> --
> Bart Janusz

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment