2

AndEngine (Physics Example) の BaseGameActivity の背景としてカメラ プレビューを表示する SurfaceView を追加するにはどうすればよいですか。

@Override
        public Scene onLoadScene() {
                mBackgroundView = new PreviewView(this);
                addContentView(mBackgroundView, new LayoutParams(
                                LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));    // Does not work
                addContentView(mBackgroundView.getOverlay(), new LayoutParams(    
                                LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));   // Works. getOverlay() returns an ImageView.

                final Scene scene = new Scene(1);
                //scene.setBackground(new ColorBackground(0.0f, 0.0f, 0.0f, 0.0f));
4

0 に答える 0