80,472
社区成员




if (screen == null)
screen = new Screen(this);
setContentView(R.layout.test_framelayout);
frmLayout = (FrameLayout)findViewById(R.id.abc1);
frmLayout.addView(screen);//一幅图
frmLayout2= (FrameLayout)findViewById(R.id.abc2);
frmLayout2.addView(_glSurfaceView);//一个正方形
这三行代码是为了正方形背景透明:
_glSurfaceView.setEGLConfigChooser(8,8,8,8, 16, 0);
_glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
scene.backgroundColor().setAll(0x00000000);
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" >
<FrameLayout android:id="@+id/abc1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<FrameLayout android:id="@+id/abc2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
</FrameLayout>