wood burning stoves 2.0*
The moose likes Android and the fly likes StackOverflowError while navigating between activities of ActivityGroup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "StackOverflowError while navigating between activities of ActivityGroup" Watch "StackOverflowError while navigating between activities of ActivityGroup" New topic
Author

StackOverflowError while navigating between activities of ActivityGroup

Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Hello,

I am making an application with tabs. In that app same TabView is to be shown in multiple activities in hierarchy. For that i used ActivityGroup. In my application i can navigate from first activity containing tab to its child activity and can come back to previous activity by pressing a button in child activity. While navigating between these two activities, i get StackOverflowError after few navigations.
I tried flag but it doesn't help.
I also tried but it finishes whole ActivityGroup.
Then i tried method but still getting same error.
Now i have no idea what to do for this problem. Any help is appreciated.
Thanks in advance.


Astha - OCPJP 6 (90%)
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

Are you showing the child activity within the same tab or does it come outside tab?


Swastik
Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Swastik Dey wrote:Are you showing the child activity within the same tab or does it come outside tab?

Its within the same tab.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

Can you some part of your code, i.e how is the child activity invoked from parent, and how the child activity is finished and the previous activity comes in front.
Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Hello Swastik,

This is my code for moving from first activity containing tabs to its child-

And the same code i am using for coming back to parent activity on click of a button-


I am killing the activities while moving to another abut don't know why, still it's showing StackOverflowError!!!
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1449
    
    6

Not sure if this helps. Every time you are creating a new Intent and new View object. Why not create them once and just use setContentView.
Astha Sharma
Ranch Hand

Joined: Oct 15, 2011
Posts: 245

Swastik Dey wrote:Every time you are creating a new Intent and new View object. Why not create them once and just use setContentView.

Do you mean i should initialize Intent and View in onCreate()? I tried this, it gives the same result even if I create these objects in onCreate() method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StackOverflowError while navigating between activities of ActivityGroup
 
Similar Threads
Animation transition between activities in ActivityGroup?
Story Problem
How to use ActivityGroup class?
Still not sure I understand the reason for intents
2 activities, get value