Child Page Activity not Started after inflating ChildView
<p>I am new to Android. </p>

<p>I want to do iPhone like <code>SplitView</code> in Android. I did it using <code>LayoutInflater</code>.</p>

<p>The view is coming in my child <code>LinearLayout</code> but the activity of that view is not started.</p>

<p>So it just render the view it is not starting activity of that <code>childview</code>. </p>

<p>I tried using Intent but it does not give me the parent view it only gives <code>childview</code>. </p>

<p>Help me to come out of this. </p>

<p>How can I start activity of the inflating view?</p>

<pre><code>@Override public void onCreate(Bundle savedInstanceState) {  
   super.onCreate(savedInstanceState);
   super.setContentView(R.layout.ParentActivity); 
   LinearLayout ChildView; ChildView = (LinearLayout) findViewById(R.id.ChildView); 
   ChildView.removeAllViews(); 
   setContentView(R.layout.ChildActivity); 
} 
</code></pre>

<p>and I also override the <code>setContentView</code> Method like</p>

<pre><code> @Override public void setContentView(int id) { 
    LayoutInflater inflater = (LayoutInflater)getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     inflater.inflate(id, ChildView);

}
</code></pre>
