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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:26:34+00:00 2026-06-16T22:26:34+00:00

I have two activities , in activityA I have a icon ,clicking that icon

  • 0

I have two activities , in activityA I have a icon ,clicking that icon i am sending an intent to other activityB, that is invoking the facebook page (custom dailog), since the fbdailog is taking time to load i am trying to implement progressdailog, below is my code

ImageView faceBookIntegration = (ImageView) activity
                .findViewById(R.id.facebookintegration);
        faceBookIntegration.setOnTouchListener(new OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                Constants.isLayoutTouched = true;
                switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN: {

                    CityAttractions.this.runOnUiThread(new Runnable() {
                        public void run() {
                         dialog = ProgressDialog.show(CityAttractions.this, "","Please wait...", true);
                            dialog.show();
                        }
                    });

                    Intent menuSettingsIntent = new Intent(CityAttractions.this, ShareOnFacebook.class);
                    menuSettingsIntent.putExtra("facebookMessage", "Msg");
                    startActivityForResult(new Intent(menuSettingsIntent).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 1);                  

                    break;              
                }                       
                case MotionEvent.ACTION_MOVE:
                    break;
                case MotionEvent.ACTION_UP:
                    break;
                }
                return false;
            }

        });

    }

The problem is after posting or cancelling the fbdailog , the progressdailog is still visible , how can i dismiss the progreessdailog from activityA. Any help is appreciated

  • 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-16T22:26:35+00:00Added an answer on June 16, 2026 at 10:26 pm

    In onActivityResult() of ActivityA do:

    if (dialog != null) {
        dialog.dismiss();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following two activities, ActivityA and ActivityB. In ActivityA.java startActivity(new Intent(this, ActivityB.class));
I have two activities that need to use my Facebook object. The first activity
I have one class called Global and two other activities. In each activity I
If I have two activities in my app, one with listview and the other
I have two activities. The first one executes the second one. Intent i =
I have two activities in my app. One is a list that is presented
I have two Activities. In my main Activity I am creating an intent to
I have two activities A and B. B : is a setting activity that
Let assume we have two activities. A - main activity, that is home launcher
I am writing an Android app with two entry points that have intent filters

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.