I can implement both variants – it’s easy. But I’m interested: what approach is better?
I mean if my application contains several screens I can make them as several layouts (XML-files) and switch using setContentView(). Or they can be several classes like MyActivity1, MyActivity2 etc., and I will switch them using Intent class.
So I’m curious: what’s the best practice?
Remember this as the Rule of Thumb:
It’s better to have similar behaviors, under single Activity, but always prefer different Activities when behaviors differ.