android - Detect clicks outside of a View -


i have view declared such:

layoutinflater layoutinflater = (layoutinflater) getsystemservice(context.layout_inflater_service); myview = layoutinflater.inflate(r.layout.background, null); 

i want detect clicks outside of myview, how can this?

so background.xml small relativelayout pops when user clicks on button. has edit text gain focus , allow type on it:

response.setfocusable(true); params.flags = params.flags & ~windowmanager.layoutparams.flag_not_focusable; mwindowmanager.updateviewlayout(myview, params); 

now if user clicks outside pop up(background.xml aka myview) want set param.flags flag.not_focusable

you can create dummy view , make fill parent , add onclicklistener , want on onclick.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -