本文共 1307 字,大约阅读时间需要 4 分钟。
These are non-application windows providing user interaction with the phone (in particular incoming calls). These windows are normally placed above all applications, but behind the status bar. In multiuser systems shows on all users' windows.
就是说设置了这个属性之后,这个窗口会在所以的界面之上,但是在状态栏的下面。在多用户系统中,所有用户的窗口上都会显示。
mFloatView.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub wmParams.x = sWidth - (int) event.getRawX() - mFloatLayout.getMeasuredWidth() / 2; wmParams.y = sHeight - (int) event.getRawY() - mFloatLayout.getMeasuredHeight() / 2; if(wmParams.y > sHeight - titleHeight){ return true; } //刷新 mWindowManager.updateViewLayout(mFloatLayout, wmParams); return false; } }); mFloatView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub web.reload(); } });