super.onCreate(savedInstanceState); final BitmapsView view = new BitmapsView(this); final FrameLayout layout = new FrameLayout(this); layout.addView(view, new FrameLayout.LayoutParams(480, 800, Gravity.CENTER)); setContentView(layout);