/** * 显示窗口,重新加载url,重新定义窗口大小,设置背景透明度 * * @param position 点击列表位置 */ private void showPopWindow(int position) { try { Bitmap screenBitmap = ScreenShortCutUtil.getShortScreen(getActivity()); if (screenBitmap != null) { FastBlur.blur(getActivity(), screenBitmap, popView); screenBitmap.recycle(); } } catch (Exception ex) { } int baseHight = 0; baseHight = Math.round(baseWidth / screenWByH); if (mList.get(position).getIsDianZan() == 0) { popHotPoint.setBackgroundResource(R.mipmap.love); } else { popHotPoint.setBackgroundResource(R.mipmap.loved); } ViewGroup.LayoutParams params = popContainer.getLayoutParams(); params.width = Math.round(baseWidth); params.height = baseHight; popContainer.setLayoutParams(params); ViewGroup.LayoutParams layoutParams = mWebView.getLayoutParams(); layoutParams.width = Math.round(baseWidth); layoutParams.height = baseHight; mWebView.setLayoutParams(layoutParams); // mWebView.setVisibility(View.GONE); mWebView.loadUrl(mList.get(position).getShowPath()); popTitle.setText(mList.get(position).getTitle()); popAuthor.setText(mList.get(position).getAuthor().getNickname()); popupWindow.showAtLocation(layView, Gravity.CENTER, 0, 0); }