super.onCreate(savedInstanceState); final OpaqueView view = new OpaqueView(this); setContentView(view, new FrameLayout.LayoutParams(100, 100, Gravity.CENTER));