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
In
onActivityResult()of ActivityA do: