팝업 윈도우 옵션 찾아보면 뒤에 배경 흐리게 하는게 있습니다. 예전에 사용을 한적이 있는데 생각이 안나네요!
편법으로 엑티비티 만들어서 그 width, height 크기를 원하시는 만큼 지정하고 가운데로 출력하게 해서 intent 넘기면
그런 효과를 볼 수 있답니다.
오래 지났지만 거쳐가시는 분들이 쉽도록 올려두겠습니다.
이런저런 방법이 있다고 하고 윈도우를 갖고오고, 설정을 바꾸고 여러 방법이 있겠지만
약간은 가라로 누구나 쉽게 할수 있는 방법으로 올리겠습니다.
저의 경우 하이브리드 앱으로 제작하기 때문에
실제 사용하는 뷰는 웹뷰 하나밖에 없어서 블러효과를 쓰는데 용이했습니다.
사용하는 "Layout".xml에
프레임 레이아웃으로 두개를 선언해 줍니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<WebView
android:id="@+id/web_webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
android:id="@+id/web_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#AA000000">
<WebView
android:layout_width="1dp"
android:layout_height="1dp" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
그리고 사용할 액티비티에서
변수 선언
LinearLayout mBackground;
Oncreate 부분에 추가
mBackground = (LinearLayout)findViewById(R.id.web_back);
mBackground.setVisibility(View.GONE);
대신 블러효과를 보여줄 layout을 숨김
popupwindow 선언 부분
mBackground.setVisibility(View.VISIBLE);
LayoutInflater layoutInflater = (LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = layoutInflater.inflate(R.layout.activity_popupwebview, null);
popupWindow = new PopupWindow(
layout,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
newWebView = (WebView)layout.findViewById(R.id.popup_webview);
popupWindow.setTouchable(true);
popupWindow.setFocusable(true);
popupWindow.update();
popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
popupWindow.showAtLocation(view,Gravity.TOP, 0, 0);
이런식으로 하면 같은 Layout에서 블러효과가 나는 layout이 보였다 안보였다 합니다.
layout이 더러워질수도 있으니 간단하게 웹뷰로만 되있는, 그런 곳에서는 사용하기 더 간단합니다.
파이팅 하세요




제일 간편한 방법으로는 투명한 이미지를 써보세요 ..ㅎ