I'm trying to write an Android application where I need to change significant elements of my layout at runtime. I could implement it by programatically moving Views
around the screen, but that would take a lot of time and a lot of work. A simpler method would be to flush the current layout
and reload the screen layout from a new layout file. However, it appears that all the API methods that made this method practical are from API 11, while I'm developing for API 10 (specifically OS 2.3.4).
To be more specific, I'm developing a calculator. I would like to implement a change-of-base feature to change between, for example, Decimal
, Hex
, and Binary
. Since, for example, Binary does not need the digits 2-9, I would like to restructure the layout both for L&F purposes as well as to recover screen real-estate rather than simply greying out the unused buttons.
I found this tutorial in the responses to a similar question, but the information there appears to be horribly outdated, and what information I can glean from that does not appear to work in my circumstance.