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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:29:04+00:00 2026-05-18T11:29:04+00:00

I want to Update the Progress bar in my application. I have created a

  • 0

I want to Update the Progress bar in my application.

I have created a new view by making use of inflater and in that newly created view I want to show the Horizontal Progress Bar Updating.

How can I do that particularly?

Also I got to know that when We create a new view by Inflater, we need to add it to the Current Activity Class by addContentView(), I don’t know how to do these though I have tried a lot till now.

Can anybody help me here?

  • 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-18T11:29:04+00:00Added an answer on May 18, 2026 at 11:29 am

    So, as you don’t provide code, let me search my crystal ball… wait… OK, there it is. You have something like this:

    View someView = inflater.inflate(R.layout.view_with_progress_bar, null);
    

    In order to access your ProgressBar, you have to use the findViewById method:

    ProgressBar yourProgressBar = (ProgressBar)someView.findViewById(R.id.id_of_your_progress_bar);
    // you can know modify the progress bar: yourProgressBar.setBlahBlah
    

    In order to add the view that contains the progress bar to you current activity, you have to have a reference to the container that you previously set. So, I guess you previously did: setContentView(R.layout.something);, then you have a layout called something.xml; that layout contains a ViewGroup (LinearLayout, RelativeLayout, etc.; my crystal ball can’t see that clearly). Then, you need to set an ID to that container, create a reference, and add your newly created view to it:

    // in your onCreate method
    setContentView(R.layout.something);
    
    // let's suppose it's a LinearLayout
    LinearLayout mainContainer = (LinearLayout)findViewById(R.id.id_you_gave_to_container);
    
    // blha blah... the rest of your code. Keep in mind that you will
    // probably have to declare the mainContainer outside the onCreate method
    
    // here, you have already inflated your view, and want to add it to your activity
    mainContainer.addView(someView);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a progress bar for my terminal application that would work
I am trying to use progress bar to show the progress of a script.
I want to display a progress bar while doing some work, but that would
I want to update a progress bar from running 1 to 100 with this
I want to update a progress bar in winforms using delegate from task. scheduler
I want to show up an progress bar while a download with NSURLConnection is
I have a tab bar application with three tabs. In my second tab view
I have an .aspx page that connects to a remote application. I want to
I want to update/upgrade the standard Leopard install of Sqlite3 to >3.5 to use
I want to update a column in a table making a join on other

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.