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 6955239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:42:39+00:00 2026-05-27T14:42:39+00:00

My TabActivity contains ProgressBar and two tabs ( Activities with ListView ). Where does

  • 0

My TabActivity contains ProgressBar and two tabs (Activities with ListView).

Where does I must initialize progress = (ProgressBar)findViewById(R.id.progress_bc); and how can I set progress.setVisibility(View.GONE); from onItemClick in ListView in Activity?

<ProgressBar 
    android:id="@+id/progress_bc"
    android:indeterminate="true" 
    android:layout_width="18dip" 
    android:layout_height="18dip"
    style="@android:style/Widget.ProgressBar.Small"/>
  • 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-27T14:42:40+00:00Added an answer on May 27, 2026 at 2:42 pm

    The initialization should be to the Activity where you want to show the dialog. So it is better to have two ProgressBar, one for every layout of your two Activities and control it there.

    So in the tab parent Activity (call it CustomTabActivity):

    public ProgressDialog dialog;
    

    In the onCreate() you initialize the dialog.

    Now when you want to use it from a child Activity, you use:

    ((CustomTabActivity)getParent()).dialog.show(); or

    ((CustomTabActivity)getParent()).dialog.dismiss();
    

    Hope this helps!

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

Sidebar

Related Questions

I have a TabActivity with two tabs-activities — FirstActivity and SecondActivity . How can
So, in my program i have a TabActivity which contains two tabs, one tab
Here's the problem. In my app, I have 5 tabs which contains activities. In
I have a TabActivity and inside 5 tabs with 5 activities each one. I
My application has a TabActivity which contains 4 tabs. Each tab contains the corresponding
I have a TabActivity that has a TabHost with two tabs. Each tab has
I worked in a tabactivity, I set the gravity for tabs as bottom. If
i have TabActivity in android project which contains some tabs. In each tab i
I have a tabhost which contains three tabs, connected with three activities. All three
I have a TabActivity with three tabs defined. The first tab is light-weight and

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.