title: Change View content in activity dynamically
body: <p>My abstract class extended from <code>Activity</code> class consists of three <code>View</code>s as described in the following XML snippet:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" 
      android:background="@drawable/bg"&gt;
  
      &lt;LinearLayout 
          android:id="@+id/top_border"&gt;
          ...
      &lt;/LinearLayout&gt;
  
      &lt;View 
          android:id="@+id/activity_content"
          ...
          /&gt;
  
      &lt;LinearLayout 
          android:id="@+id/bottom_border"&gt;
          ...          
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And in <code>onCreate()</code> method I set this XML-layout as content view.</p>
  
  <p>I want the <code>Activity</code>s which extend this one to override <code>onCreate()</code> and there define the activity_content <code>View</code> remaining borders immutable.</p>
  
  <p>For example like this:</p>
  
  <pre><code>abstract public class MyActivity extends Activity {
     protected View mContent;
  
     @Override
     protected onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.common_layout);
        initializeContent();
     }
  
     abstract void initializeContent();  
  }
  
  class OneActivity extends MyActivity {
  
     @Override
     protected void initializeContent() {
        mContent = View.inflate(this, R.layout.some_view, null); // i.e. concrete View (e.g. LinearLayout, FrameLayout, GridView, etc.)
     }
  }
  </code></pre>
  
  <p>But when I do so my mContent remain the same as it was when I defined it in <code>MyActivity</code>'s <code>onCreate()</code>.</p>
  
  <p>How can I change view's type/content depends on what <code>Activity</code> is in foreground?</p>