android - popup dismiss on touch outside of popup -
i have 2 layouts 1 layout 80% of screen , other 20% of screen(lanscape mode), on 20% of screen layout have few buttons vertically.on click of each button popup window come on 80% screen layout,on touch outside popup window, popup window dismiss. problem on touch 80%screen popup should dismiss not on 20% screen.
ref_channel.setonclicklistener(new onclicklistener() { @suppresswarnings("deprecation") public void onclick(view v) { display display = getwindowmanager().getdefaultdisplay(); point size = new point(); display.getsize(size); width_device = size.x; x = (width_device - ref_channel.getwidth()); layoutinflater = (layoutinflater) getbasecontext() .getsystemservice(layout_inflater_service); popupview = layoutinflater.inflate(r.layout.refchannel_popup, null); popupview.measure( measurespec.makemeasurespec(0, measurespec.unspecified), measurespec.makemeasurespec(0, measurespec.unspecified)); int s = x - (int) ((popupview.getmeasuredwidth())); pup1 = new popupwindow(popupview, android.view.viewgroup.layoutparams.wrap_content, android.view.viewgroup.layoutparams.wrap_content); pup1.setbackgrounddrawable(new bitmapdrawable()); pup1.setfocusable(true); pup1.showatlocation(ref_channel, 0, s, 0); } });
you have used : pup1.setoutsidetouchable(true);
set property "false".
Comments
Post a Comment