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

  • Home
  • SEARCH
  • 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 691225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:31:08+00:00 2026-05-14T02:31:08+00:00

I have a TabActivity with three tabs defined. The first tab is light-weight and

  • 0

I have a TabActivity with three tabs defined. The first tab is light-weight and renders in acceptable time. But the 2nd and 3rd tab, does need a couple of seconds to get visually rendered, after I click them. I would like to launch them, after I’ve loaded my first tab, in background for pre-cache. Once they are loaded, I can switch quickly between them.

So I am wondering how can I launch the 2nd and 3rd tab. They are new activities loaded in the view area.

  • 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-14T02:31:08+00:00Added an answer on May 14, 2026 at 2:31 am

    Step #1: Get rid of all the activities being used as the contents of tabs.

    Step #2: Rewrite them as being Views (children of your FrameLayout in your main layout file for the TabHost activity), and get it working. Having activities as the contents of tabs adds overhead for no meaningful benefit.

    If that is insufficient of a performance gain, then…

    Step #3: Move your second and third tabs into separate layout files. Inflate them in onCreate() but just hold onto them (don’t attach them to the TabHost). When adding the tab specs, use the one that takes a TabContentFactory, and have the factory grab the pre-built Views.

    If that simply shifts your performance problem into onCreate(), then…

    Step #4: Try inflating and setting up those views in background threads. This may just blow up, because Android does not like UI operations on background threads. Even if it does work, you will need to have smarts to deal with the possibility that the user clicks on the 2nd tab before you are done with your work.

    Or, you could just speed up whatever those tabs are trying to do so they don’t take as much time, at least at the outset.

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

Sidebar

Related Questions

I have a TabActivity that hosts other three activities. If the first tab is
I have a TabActivity that has three tabs. The fist tab is the problem.
here's my questions: i have a normal tabactivity, with my three tabs defined like
I have a TabActivity with several tabs. Each tab corresponds to a specific view,
I have created three tabs in TabActivity onCreate . How can I hide one
So, in my program i have a TabActivity which contains two tabs, one tab
I have a TabActivity with 5 tabs in it and each tab has an
I have three tabs.. Personal info,profile info and FinalStep... First of all i need
I have a tabactivity with several tabs. Each tab has an ActivityGroup associated with
I have TabActivity and also three others activities in tabs. In Manifest file I

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.