LinearLayout mainLayout= (LinearLayout) findViewById(R.id.layout_main); mainLayout.removeAllViews(); View view = getLocalActivityManager().startActivity(id, intent).getDecorView(); mainLayout.addView(view, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));