옵션 |
|
1 2 3 4 5 6 | mParams = new WindowManager.LayoutParams( WindowManager.LayoutParams.WRAP_CONTENT,//w WindowManager.LayoutParams.WRAP_CONTENT,//h WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,//_type WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,//_flags PixelFormat.TRANSLUCENT);//_format | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | dispatchTouch(x, y);//(x,y)에 터치이벤트 발생 private void dispatchTouch(int x, int y){ // Obtain MotionEvent object long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis() + 100; int metaState = 0; MotionEvent motionEvent = MotionEvent.obtain( downTime, eventTime, MotionEvent.ACTION_UP, x, y, metaState ); // Dispatch touch event to view mCursorView.dispatchTouchEvent(motionEvent);//mParams를 갖고있는 위에서 언급된 그 뷰 } | cs |