Oh in the last release of the android studio the location of the offline mode option has changed!
But it is so easy to just click on Gradle on the right side of the android studio or (go to View > Tools windows and select Gradle! )
and Like a photo Turn on or Turn off the Wifi Icon :