popupWindow.setOutsideTouchable(true);
popupWindow.setFocusable(true);
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
public void onDismiss() {
// 在PopupWindow关闭后执行的操作
}
});
@Override
protected void onPause() {
super.onPause();
if (popupWindow != null && popupWindow.isShowing()) {
popupWindow.dismiss();
}
}
上一篇:AndroidpluginJenkins.Error:emulator"packagemustbeinstalled!Jenkinsdocker"
下一篇:AndroidPorterDuffmaskingwith9-patchisleavingablacksquarebackgroundinandroid4.4。