在我的应用程序中,当我点击一个图标时,我在 fb 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 dialog = ProgressDialog.show(CityAttractions.this, "","Please wait...", true);
dialog.show();
}
});
Intent menuSettingsIntent = new Intent(CityAttractions.this, ShareOnFacebook.class);
menuSettingsIntent.putExtra("facebookMessage", "Msg");
startActivity(new Intent(menuSettingsIntent).addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT));
break;
}
case MotionEvent.ACTION_MOVE:
break;
case MotionEvent.ACTION_UP:
break;
}
return false;
}
});
}
当我点击图标时遇到两个问题我得到了progressdailog(这里微调器没有旋转),然后得到fbdailog这很好,在我取消fbdailog后我仍然看到进度dailog,如何在fb dailog之后关闭progressdailog已完成任何帮助表示赞赏