Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6381569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:24:39+00:00 2026-05-25T02:24:39+00:00

I have an application with 3 tabs with one activity per tab. When I

  • 0

I have an application with 3 tabs with one activity per tab. When I am switching between first two activities, the activity, which is going to background passes the onPause() state, while the new one becomes active and onResume() is called. That’s good, because both activities have a complex UI and rendering them takes 2-3 seconds, but when they are kept in paused state, they are resumed quickly.

But when I click on the 3rd tab, then the application behavior is different, the activity, which is going to background, is completely destroyed (it passes onPause(), onStop() and onDestroy()).

Any idea why there is difference in behavior? Is there a way to force the activity to remain in a paused state when user switches to another activity within the application?

Thanks
STeN

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:24:39+00:00Added an answer on May 25, 2026 at 2:24 am

    This behaviour can even be different on another device or in any other context (different amount of available memory, etc).

    You have the guarantee that

    • onResume() is called when an Activity is going foreground
    • onPause() is called when the Activity is going background,

    and this is the only guarantee you have. (More details on the Activity lifecycle here).

    So you can make absolutely no assumption about the calling of onStop() and onDestroy(). They may be called or not each time you are switching from a tab to another, and your application needs being able to handle this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I have an Application with two Tabs in WPF. One is Used to add
I have an iPhone application with Tabbar. One of the tabs is UIWebView which
I have an iphone application which has about 4 tabs. How do I force
I have a tab bar iPhone application with 4 tabs. In the Interface Builder
I have several tabs in my application, and each tab loads a different sub-page
Here's my problem: I've have an application with tabs. in each tab I have
I have an application that has a tab widget in it. One of the
I am developing an android application in which i have created five tabs and
Friend's, I implemented tabhost in my application,i have three tabs defined in my activity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.