PopupWindow中的GLSurfaceView

Bła*_*app 5 android popupwindow glsurfaceview

我需要一个添加GLSurfaceViewFrameLayout一个PopupWindow.问题是,在内部,SurfaceView从当前窗口请求令牌.PopupWindows没有他们自己的令牌,所以我从弹出父母那里给它一个令牌,如下所示:

class MySurfaceView extends GLSurfaceView {
   ...
  @Override
  public IBinder getWindowToken() {
      // I set the mPopupParent manually to be the parent of the PopupWindow in question
      return mPopupParent.getWindowToken();
    }
  }
  ...
}
Run Code Online (Sandbox Code Playgroud)

现在,即使MySurfaceView添加到了FrameLayout内容中PopupWindow,它也不会在那里绘制.它借鉴了我从中得到令牌的观点.

如何在实际添加的布局上绘制它?

编辑:只是为了给出更多细节,如果它有所不同,mPopupParent是一个IME视图(基本上是一个键盘).

小智 0

I got something just like yours,and finally these ways work out:
Run Code Online (Sandbox Code Playgroud)

A 。使用对话框

B.使用android.view.WindowManager