0
I have a mirroring of a website on Webview and would like to press the button Come back back to the previous page. Currently if I press the button Come back from Smartphone, the application is minimized (Stays in the background). I don’t know how to do it, someone can help me?
Mainactivity
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        WebView wv = (WebView) findViewById(R.id.webview1);
        wv.loadUrl("https://www.xxxx.com.br");
        wv.setWebViewClient(new WebViewClient());
        WebSettings ws = wv.getSettings();
        ws.setJavaScriptEnabled(true);
        ws.setSupportZoom(false);
Manifest
<uses-permission android:name="android.permission.INTERNET" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@drawable/ic_stat_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
Please, you can assemble the script based on my Mainactivity, reason: Error presented (I am layman in programming).
– Ever
I edited my answer with the code of how it would look in your Mainactivity, give a look, any questions warns
– Leonardo Dias
After the edition I was successful.
– Ever