I implement windowManager in the Service class
WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE); wm.addView(mView, params);
I added a view to my window manager, but the listener for this view does not work.
mView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) {
Here are the layout options.
WindowManager.LayoutParams params = new WindowManager.LayoutParams(130,130); params.type=WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY; params.flags=WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH; params.format=PixelFormat.TRANSPARENT;
I want this listener to click in order to work normally, but it does not work, so please help me in this regard.
source share