Androidプログラミング初心者質問スレ Pert2
■ このスレッドは過去ログ倉庫に格納されています
0684デフォルトの名無しさん
2010/09/23(木) 02:22:52なぜかmViewの背景色は適用されず、黒のままです。
mViewを透過描画するにはどうすればよいでしょうか?
public class DrawTestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GLSurfaceView mGLSurfaceView = new GLSurfaceView(this);
mGLSurfaceView.setEGLConfigChooser(5, 6, 5, 8, 16, 0);
mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
mGLSurfaceView.setRenderer(new com.example.android.apis.graphics.CubeRenderer(true));
LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
View mView = new View(this);
mView.setBackgroundColor(Color.RED);
setContentView(mView, params);
addContentView(mGLSurfaceView, params);
}
}
■ このスレッドは過去ログ倉庫に格納されています