Possible Duplicate:
switching xml layout causes crash in Android
I have many xml layouts with image backgrounds and Buttons. I need to switch layouts so I use this function many times
setContentView(R.layout...);
it causes crash at 4. or 5. call of setContentView() because of previous layouts... using of System.gc(); Runtime.getRuntime().gc();
didn't work.