I have a custom TextureView
that all the rendering is handled using OpenGL ES through JNI/C++.
Pretty much everything is working, aside the startDragAndDrop
method. Which gives me an empty drag view...
Looking at the source code of the View.DragShadowBuilder
class I found out that all the rendering logic for the creation of the drag view is inside the method public void onDrawShadow(Canvas canvas)
; which basically it passes the canvas to the onDraw(Canvas canvas)
method of the view.
Now the problem is that TextureView
doesn't implement the onDraw(Canvas canvas)
method. And I'm unable to override it since it's final...
Is there any way that I can render the content of my TextureView
in this canvas...
Right now I'm able to create a bitmap using a ByteBuffer
and copying the buffer from OpenGL. But again I don't know how to pass this bitmap to the canvas...