I've a big switch statement in my fragment class. Each case call other functions that for example download an Image and display It, or inflate a layout and show It. Is It a bad pratice? I've read that switch statement can be refactored in order to have a clean code, but how can I clean this code if I call different functions for each case?
Code example
switch(message.type){
case type.IMAGE:
downloadAndDisplayImage(); //Download Image and display It in a imageview
break;
case type.MAP:
inflateAndDisplayMap(); //inflate and display a MapView inside a layout
break;
And so on..