I would like the main layout file (main.xml) respond to the main activity. I would like a TextView inside the layout file only to show if a variable, located in the main activity, equals a certain number, like 0. If the variable is 1 or 2, I want it to show something else.
What’s the easiest way to perform this? I’m not really sure if this is even possible!
Not in the declarative way. You can only achieve it in the code (main activity).
This is quite simple, for example:
I assumed the variable you have is called Variable above.