完成光环前端优化汇总(4月第1周)的7,8,12 https://gitlab.ghzs.com/pm/halo-app-issues/issues/824

This commit is contained in:
chenjuntao
2020-04-06 10:05:17 +08:00
parent 860769c44a
commit c7cd56e7be
6 changed files with 36 additions and 10 deletions

View File

@ -206,9 +206,9 @@ public class ShareUtils {
arrLogo[7] = R.drawable.share_cancel_logo;
}
popupWindow = new PopupWindow(contentView, LinearLayout.LayoutParams.MATCH_PARENT
popupWindow = new SharePopupWindow(contentView, LinearLayout.LayoutParams.MATCH_PARENT
, LinearLayout.LayoutParams.MATCH_PARENT, true);
popupWindow.setAnimationStyle(R.style.mypopwindow_anim_style);
popupWindow.setAnimationStyle(R.style.popwindow_exit_only_anim_style);
//解决PopupWindow无法覆盖状态栏
popupWindow.setClippingEnabled(false);
@ -655,5 +655,20 @@ public class ShareUtils {
void onCancel();
}
}
private static class SharePopupWindow extends PopupWindow {
SharePopupWindow(View contentView, int width, int height, boolean focusable) {
super(contentView, width, height, focusable);
}
@Override
public void dismiss() {
View backgroundView = getContentView().findViewById(R.id.share_container);
if (backgroundView != null) {
backgroundView.setBackgroundColor(Color.TRANSPARENT);
}
getContentView().postDelayed(super::dismiss, 0);
}
}
}