You can set your phone to use mobile data automatically when the connection to the Wi-Fi network is weak. To turn automatic use of mobile data on or off, you need to turn on mobile data.
Slide two fingers downwards starting from the top of the screen.
Press the settings icon.
Press the indicator next to "Wi-Fi" to turn on the function.
Press Advanced settings.
Press Wi-Fi Assistant.
Press the indicator next to "Auto-conect to the best Wi-Fi" to turn on the function.
Press the indicator next to "Auto-switch to mobile network" to turn the function on or off.
Press the Home key to return to the home screen.