Wednesday, April 17, 2013

[android help] How to destroy a Layout?

android - How to destroy a Layout? - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I'm developing an Android app in which I use LayoutInflator to generate new layout. What the app does basically is - Its has one imageview. When I click on a button, I change the layout to display multiple ImageViews (like 2x2 or 4x4). I am successful in displaying these layouts using the LayoutInflator. However, the previous Layout stays intact and the new Layout is displayed over the old Layout which, kind of, messes the whole layout. My question is - is there anyway to destroy the old layout before displaying the new one?


























Maybe you could just make your layout invisible if that is the case. This can be done quite easily programmaticaly:



layout.setVisibility(View.GONE);



















default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...