My Android app has two layouts, one for <= normal
, and one for >= large
. I can re-use my corresponding activity 99.9% in both cases, but I need it to know different bits of information for the two layouts. I could of course write a giant if
expression, but I'd rather let Android work its magic, since it's already doing it by loading the two different layouts.
So, can I embed pieces of information in the two XML files and retrieve them in my activity class? Or am I completely off the map and the right approach is completely different?