There is an error when insert two activity in activity
<p>In my MounthActivity, there are two activities.</p>

<p>First is MonthChart and second is Test.</p>

<p>My code is following :</p>

<pre><code>package com.h.callsta;

    import android.app.ActivityGroup;
    import android.app.LocalActivityManager;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.view.Window;
    import android.widget.LinearLayout;

public class MonthActivity extends ActivityGroup{

    private LinearLayout lo1, lo2;   

       LocalActivityManager lam = getLocalActivityManager();

public void onCreate(Bundle savedInstanceState) {   

    super.onCreate(savedInstanceState);   
    setContentView(R.layout.activity_month);
    lo1 = (LinearLayout) findViewById(R.id.lo1);  
    lo2 = (LinearLayout) findViewById(R.id.lo2);
    start_activity();

      }

public void start_activity(){

   Window win1 = lam.startActivity("0",new Intent(MonthActivity.this, MonthChart.class));
   View view1 = win1.getDecorView();
   lo1.addView(view1);  
   Window win2 = lam.startActivity("1",new Intent(MonthActivity.this, test.class));
   View view2 = win2.getDecorView();
   lo2.addView(view2);

     }


}
</code></pre>

<p>when run is only shows <code>MonthChart</code>,and the <code>test</code>didn't</p>

<p>But if I change the order of them, that Test activity will be first and MonthChart will be second, and they became visible properly, Why?</p>

<p>I guess it is because the MonthChart is too long ,is it? </p>

<p>How to solve it ?</p>
