I would like to achieve this layout :
my main activity layout (main.xml);
(Please mouse right click the following image and view image)
I have made another ContentActivity (with content set to content_one.xml) which is supposed to be used as part (the right part) of the above layout:
I know I can inflate a layout by:
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, besides inflate the content_one layout into main layout, is it possible to inflate a activity class instead of inflating a layout in android? If possible, how to do it?