2013-06-11 5 views
5

GLSurfaceView을 의 FrameLayout에 추가해야합니다. 문제는 내부적으로 SurfaceView이 현재 창에서 토큰을 요청한다는 것입니다. MySurfaceViewPopupWindow의 내용이, 그것을하다는 FrameLayout에 추가하더라도, 지금PopupWindow의 GLSurfaceView

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(); 
    } 
    } 
    ... 
} 

: PopupWindows 자신의 토큰이없는, 그래서 나는과 같이, 대신 그것을 팝업 부모로부터 토큰을 제공 거기에 끌리지 않는다. 그것은 내가 토큰을 가지고 있다는 관점에서 끌어 낸다.

실제로 추가되는 레이아웃에서 어떻게 그릴 수 있습니까?

EDIT : mPopupParent는 차이점이있는 경우 IME보기 (기본적으로 키보드)입니다.

+0

'PopupWindow'를 고수해야합니까? 대신'Dialog' 테마로 일반 Activity를 사용해야한다고 생각합니다. –

+0

IME에서 작업하고 있습니다. 불행히도 작업 할 작업이 없습니다. –

+1

SurfaceView를'addView'를 통해'WindowManager'에 직접 추가해 보았습니까? – Delyan

답변

0
I got something just like yours,and finally these ways work out: 

A. 대화 상자 사용

B. android.view.WindowManager 사용