0

i'm newbie. I have a application that show 3d model with surfaceview, but i just want show shape of model without background of surfaceview like below picture. How do i reach it ? Thank you.' enter image description here

I try surfaceView.setZOrderOnTop(true),surfaceView.holder.setFormat(PixelFormat.TRANSPARENT) but not working !.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
Khang Pham
  • 1
  • 1
  • 1

1 Answers1

0

Find view by id Or call this code directly on the SurfaceView object:

SurfaceView sfvTrack = (SurfaceView)findViewById(R.id.sfvTrack);
sfvTrack.setZOrderOnTop(true);    // necessary
SurfaceHolder sfhTrackHolder = sfvTrack.getHolder();
sfhTrackHolder.setFormat(PixelFormat.TRANSPARENT);

check this link

Abolfazl Abbasi
  • 309
  • 2
  • 12