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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:36:52+00:00 2026-06-06T15:36:52+00:00

hey i want to display a loading progress using ProgressDialog on my aplication, but

  • 0

hey i want to display a loading progress using ProgressDialog on my aplication, but i’m confuse where to place it… here is the ilustration of my code… the code to create a grayscale image…

public void but_gray(View v){
    ProgressDialog prog = ProgressDialog.show(this, "", "tesLoading",true);
    bmp = grayscale(bmp);
    prog.dismiss;

}

That’s my code, but when i run the code, dose not show the progress dalog…
the but_gray is a function when i click the grayscale button…
bmp is a bitmap variabel..
grayscale() is a function thats create a grayscale image…

anyone can give me solution

  • 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-06-06T15:36:54+00:00Added an answer on June 6, 2026 at 3:36 pm

    just create asynctask like ,

      class Background_task extends AsyncTask<Void, Void, Void>
      {
      ProgressDialog progressDialog;
       @Override
        protected void onPreExecute() 
        {
            super.onPreExecute();
            progressDialog = ProgressDialog.show(DisplayBooksView.this, null, "Loading..."); 
        }
    
        @Override
        protected Void doInBackground(Void... params) 
        {
            bmp = grayscale(bmp);
            return null;
        }
    
        @Override
        protected void onPostExecute(Void result) 
        {
            super.onPostExecute(result);
            progressDialog.dismiss();
        }
    }
    

    then call this asynctask in your function like,

        public void but_gray(View v){
              new Background_task().execute();
        }
    

    it will works fine…..

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

Sidebar

Related Questions

Hey, I want to store application configuration data. Currently, I'm using INIs but they
hey guys i want to create one display form in which at the bottom
hey, my question is that i want to display the names whose payment type
hey i want to be able to create multiple shapes and store them perhaps
Hey i dont know if that is possible but i want to set a
Hey guys, I have an application that I want to display some data from
Hey i want to display a Title and Image simultaneously on UIToolbar can any
Hey, I want to display an activity indicator on the right corner of my
Hey im messing with a search function currently and i want it to display
Hey i want to create a thumbnail viewer, for my app, i want something

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.