android - Receive touch event on any screen -
i'm trying make custom navigation button , have disabled default navigation buttons provided android rooting device. want custom navigation buttons disappear after interval of time (say 5 seconds). have managed so. want make such whenever touch anywhere on screen, can detect touch event , show navigation bar. whether i'm on homescreen or application, can receive touch event. there way or need go android source code?
thank you
oncreate of service: used windowmanager.layoutparams.flag_watch_outside_touch flag.
@override public void oncreate() { super.oncreate(); toast.maketext(getbasecontext(),"oncreate", toast.length_long).show(); mview = new hudview(this); windowmanager.layoutparams params = new windowmanager.layoutparams( windowmanager.layoutparams.type_system_overlay, windowmanager.layoutparams.flag_watch_outside_touch, pixelformat.translucent); params.gravity = gravity.right | gravity.top; params.settitle("load average"); windowmanager wm = (windowmanager) getsystemservice(window_service); wm.addview(mview, params); }
now, start getting each , every click event.
Comments
Post a Comment