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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:32:23+00:00 2026-05-31T23:32:23+00:00

I am developing an activity which have an Update button as menu for android.

  • 0

I am developing an activity which have an Update button as menu for android. I want to show a dialog. I done it via
showDialog()
Update operations are controlled by a function named update_rates()
update include downloading file from internet and updating database values
But when i click the menu button it stucks the it download the file and update database.
if I comment the update_rates function it shows dialog but with update_rates it doesn’t show dialog
How can i solve this problem?

https://github.com/sreevisakh/android/blob/master/src/com/sv/cc/main.java

  • 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-31T23:32:24+00:00Added an answer on May 31, 2026 at 11:32 pm

    Does it never show the dialog? Or does it only show the dialog once it’s done it’s processing?

    To me, it sounds like your update_rates() method is either:

    • doing it’s work on the UI thread and therefore blocking any subsequent operations (including things like displaying dialogs) until it is complete (so you’d see the dialog afterwards, depending on the ordering of the code).
    • not running on the UI thread, but attempting to perform UI actions; which Android does not allow.

    If either case is true, then you may want to investigate using AsyncTask to do the work; as this operates in a separate thread, but is also able to perform UI actions.

    This article has some more information: http://developer.android.com/resources/articles/painless-threading.html

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

Sidebar

Related Questions

I am currently developing an android app. I have an activity which calls a
I'm developing an Android 2.2 application. I want to know which activity method is
I am developing android application in which i have to open option menu from
I am developing an android application in which i have created five tabs and
I am developing on Android 2.3.3 (Gingerbread) and I have this particular activity that
I have an Android app, in which Activities fire long running operations that run
Newbee to Android development. I am developing a application, which have three different tabs.
I am developing a small application in android in which i have few image
I am developing an android application in which I have passed a string from
I'm in the process of developing an android game. I have an activity that

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.