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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:01:48+00:00 2026-05-27T12:01:48+00:00

I am using async task and my loading screen is as shown in image

  • 0

I am using async task and my loading screen is as shown in image
enter image description here

But i want to show only that blue progress line not the dialog. what should i do?

here is my code

      @Override
    protected Dialog onCreateDialog(int id) {
        switch (id) {
            case DIALOG_DOWNLOAD_PROGRESS: //we set this to 0
                mProgressDialog = new ProgressDialog(this);
                mProgressDialog.setProgressDrawable(getResources().getDrawable(R.drawable.progress_bar_states));
                mProgressDialog.setMessage("Downloading file...");
                mProgressDialog.setIndeterminate(false);
                mProgressDialog.setMax(100);
                mProgressDialog.setTitle("Please wait while checking new database");
                mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
                mProgressDialog.setCancelable(true);
                
              mProgressDialog.show();
                
              
                return mProgressDialog;
            default:
                return null;
        }
    }

Or how can i show only that percentage 53% or 53/100 in above image without dialog?

I just solve how to show the percentage but no ‘progress’ on progress line.

  • 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-27T12:01:49+00:00Added an answer on May 27, 2026 at 12:01 pm

    I have use to display the seekbar in dialog and its progress.Below code R.layout.pg contains one seekbar.Add more code whatever you want.
    In Oncreate:

    Seekbar seek;

    {
             d = new Dialog(this,
                    android.R.style.Theme_Translucent_NoTitleBar);
            LayoutInflater inflter=getLayoutInflater();
            View v=inflter.inflate(R.layout.pg, null);
            seek=(SeekBar) v.findViewById(R.id.seekBar1);
            d.setContentView(v);
    
            d.show();
            new Myasync().execute();
    
        }
        Dialog d ;
    class Myasync extends AsyncTask<Void, Integer, Integer> {
    
        boolean isTrue=true;
        int i=0;
        @Override
        protected Integer doInBackground(Void... params) 
        {
    
            while(isTrue)
            {
    
                publishProgress(i++);
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e)
                {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                if(i>100)
                {
                    isTrue=false;
                }
            }
    
            return null;
        }
    
        @Override
        protected void onPostExecute(Integer result) 
        {
            d.dismiss();
            super.onPostExecute(result);
        }
    
        @Override
        protected void onProgressUpdate(Integer... values) 
        {
            // TODO Auto-generated method stub
            seek.setProgress(values[0]);
            super.onProgressUpdate(values);
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my android application i am using a loading screen,processed by Async task.In do
I have a public async Task Foo() method that I want to call from
I want to create loading progress bar when my activity is starting. I have
I am using async task for downloading an audio file and I am having
I am using AsyncTask to get data from a server and want to show
I am using celerybeat to kick off a primary task that kicks of a
i am downloading data from website using asynctask and my code for async task
how to run the async task at specific time? (I want to run it
Friends, onCreate() I am loading data from webservice using Async thread. when thread is
I'm currently loading a webpage using a thread and I need a progress bar

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.