Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StackOverflowError while navigating between activities of ActivityGroup

 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Swastik Dey
Rancher
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you showing the child activity within the same tab or does it come outside tab?
 
Astha Sharma
Ranch Hand
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 250
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic