I would like to achieve this layout:
my main activity ( main.xml );
( Please right click on the following image and view the image )

I made another ContentActivity (with the content set in content_one.xml ), which is supposed to be used as part (right side) of the above layout:

I know I can inflate the layout:
LinearLayout mainLayout = (LinearLayout) findViewById(R.id.main); LayoutInflater inflater = (LayoutInflater)Home2.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View inflatedView = (View) inflater.inflate(R.layout.content_one, null); mainLayout.addView(inflatedView);
I am wondering, in addition to inflating the layout of content_one into the main layout, is it possible to inflate an activity class rather than inflate the layout in android? If possible, how to do it?
source share