0
팝업 창이 표시됩니다. 내가 ImageView의 클릭 이벤트에서 보여 주면, 나는 그것을 숨기라고 숨 깁니다. 그러나 ImageView의 Touch 이벤트에 표시하면 이벤트 호출이 취소되지만 팝업은 숨겨지지 않습니다. 이 오류의 원인은 무엇입니까? 어떻게 해결할 수 있습니까?PopUpWindow 문제를 닫습니다.
내가 팝업 창을 표시하는 데 사용되는 코드는
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int width = dm.widthPixels; //320
CabotMessageHandler.printConsole("width of screen"+width);
//show Popup
LayoutInflater inflater = (LayoutInflater)
this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
popupView=inflater.inflate(R.layout.gallerytoppopup, null, false);
pw = new PopupWindow(
popupView,
width,
30,
true);
// The code below assumes that the root container has an id called 'main'
pw.setAnimationStyle(R.anim.popupanimation);
pw.showAtLocation(this.findViewById(R.id.webview), Gravity.TOP, 0, 30);