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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:13:34+00:00 2026-05-30T01:13:34+00:00

I created a Progress bar but I can’t see the loading animation. It’s frozen.

  • 0

I created a Progress bar but I can’t see the loading animation. It’s frozen. I want to display a progress bar when I click on the item and then see the bar working and not frozen. Here is my code:

     lv.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view,
            int position, long id) {
           if (((TextView) view).getText().equals("Zman-New (rus)")){

               progDailog = ProgressDialog.show(testLoading.this, "Getting data", "Loading...",true,true);
               new GetDataTask("stringurl.xml").execute();

              }

Here is the getdata

 private class GetDataTask extends AsyncTask<Void, Void, Integer> {
String url;
GetDataTask(String url){
    this.url=url;
}
@Override
protected Integer doInBackground(Void... params) {
        //do all your backgroundtasks 
      intent = new Intent(rusNewsP.testLoading.this, rusNewsTest.rusNewsActivite.class);
      intent.putExtra("url",url);
      startActivity(intent);
      finish();
        return 1;
}

@Override
protected void onPostExecute(Integer result) {

        //finish up ( or close the progressbar )

        //do something with the result
    progDailog.dismiss();
        super.onPostExecute(result);
}
 }
  • 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-30T01:13:36+00:00Added an answer on May 30, 2026 at 1:13 am

    If you just want to test Progress try this:

    private class Initialize extends AsyncTask<Short, Short, Short> {
                ProgressDialog pd;
    
    
    
    @Override
    protected void onPreExecute() {
        pd = new ProgressDialog(yourlass.this);
        pd.setMessage("test");
        pd.show();
        super.onPreExecute();
    }
    
    @Override
    protected Short doInBackground(Short... params) {
        try {
        synchronized (this) {
            wait(2000);
        }
        } catch (InterruptedException ex) {
        }
        return null;
    }
    
    @Override
    protected void onPostExecute(Short result) {
        pd.dismiss();
        super.onPostExecute(result);
    }
    }
    

    And don’t call startActivity in the doInBackground-Method. Call it in OnPostExecute instead. GUI Operations should not be done in doInBackground.

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

Sidebar

Related Questions

I want to create loading progress bar when my activity is starting. I have
I have created a C# COM DLL which is essentially an enhanced progress bar
I want to provide a progress bar for my users who upload very large
How can I set a progress bar that may start when an HTTPService is
I am trying to increment my progress bar on a broadcast recieved but the
How can we update a progress bar in ListView. When each progress bar is
how to create a progress bar column in DataGrid control in c#
I'd like to create a progress bar to indicate the status of an a
I am trying to find the best option to create a simple progress bar
Does anyone know of any methods to create a file upload progress bar in

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.