Is it possible to have two different layouts for different cases in the same activity or do I have to use intent to call another activity with a di
intent
activity
Yes this is also possible with switch case
I already tried this code....
switch (condition) { case 1: setContentView(R.layout.layout1); break; case 2: setContentView(R.layout.layout2); break; case 3: setContentView(R.layout.layout3); break; default: setContentView(R.layout.main); break; }