I want to use common progressBar which is used in all activities. This can be done by checking in if else statements like
if(mContext instanceOf ActivityA)
   {
     //Do Something   
   }else if(mContext instanceOf ActivityB)
   {
    //Do Something
   }
But I want to do Something like :
switch(mContext){
case mContext instaceOf ActivityA:
                    //Do Something
case mContext instanceOf ActivityB:
                    //DoSomething
}
How Can I Achive by checking context in switch
 
     
     
     
    