java - Detect for fullscreen from a service in android -
i creating color picking feature able pick color anywhere on android screen.
i able pick color accurately when app gets full screen, calculations have account system ui's height calculation.
if (fullscreenstate == true) ycoord = ycoord + statusheight; int pixel = screen.getpixel(xcoord ,ycoord); log.d("pixel color", "pixel color: + " + integer.tohexstring(pixel) + " @ x:" + xcoord + " y:" + ycoord);
you need add transparent view window manager, 1px width , match_parent height. then, add global layout listener view, , every time there's change on layout, check position of view on screen. if it's y 0, status bar not visible, full screen app must running.
Comments
Post a Comment