Animation using containment inheritance
<p>if  i want to add the containment inheritance in the program. it is showing the exception and ask for force to kill.can any one explain me why? if i am not using properly then suggest me withe piece of the code .</p>

<pre><code>public  class SongsActivity extends Activity{

    DemoView demoview ;
    FinalView finalview;
    LayoutAnimationController  c;
   /// containment inherttance using above
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        boolean first=true;
        boolean sec=false;
        demoview = new DemoView(this);
        finalview = new FinalView(this);

        for(int i=1;i&gt;0;i++)
        {
            if (first==true||sec==false)
            {

                setContentView(finalview);
                c.setDelay(1000);//containment inheritance using .
                first=false;
                sec=true;
                break;
            }else if(first==false||sec==true)
            {

                c.setDelay(1000);
                first=true;
                sec=true;
            }else if(first==true||sec==true)
            {
                setContentView(demoview);
                first=false;
                sec=false;
            }else
            {   
                setContentView(demoview);
                first=false;
                sec=false;
            }
        }
    }
</code></pre>
