我有两个活动,在activityA
我有一个图标,单击该图标我正在向其他人发送一个意图activityB
,即调用 facebook 页面(自定义 dailog),因为fbdailog
我正在尝试实现加载时间progressdailog
,下面是我的代码
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;
}
});
}
问题是在发布或取消之后fbdailog
,progressdailog
仍然可见,我该如何关闭progreessdailog
from activityA
。任何帮助表示赞赏