I'm developing a small aplication in Android with Android Studio. It is just a WebView that connects to a URL and shows a webpage in fullscreen mode. I don't need the software Keyboard so I disable it, but still shows a popup Keyboard in the bottom of my webview (See image). If I click it, the popup dissapears, but when a click in any part of the webview, it appears again. It doesn't show the keyboard in any case—just the pop up.
I can't edit the URL content.
How can I disable this pop-up permanently?
This is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cl.archibaldo.floreantpos">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:theme="@style/AppTheme"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
>
<activity
android:name=".ActivityWebView"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden"
android:screenOrientation="landscape"
android:windowSoftInputMode="stateAlwaysHidden"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
<activity android:name=".MainActivity"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
My activity_webview.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:descendantFocusability="blocksDescendants"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="cl.archibaldo.floreantpos.ActivityWebView">
<WebView
android:focusable="false"
android:focusableInTouchMode="false"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
And my ActivityWebView.java
package cl.archibaldo.floreantpos;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebView;
public class ActivityWebView extends Activity {
WebView myWebView;
View decorView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
String url = intent.getStringExtra("URL");
this.setContentView(R.layout.activity_webview);
hideSystemUI();
myWebView = (WebView) this.findViewById(R.id.webview);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
myWebView.setSaveEnabled(true);
myWebView.getSettings().setLoadWithOverviewMode(true);
myWebView.getSettings().setUseWideViewPort(true);
myWebView.loadUrl(url);
decorView.setOnSystemUiVisibilityChangeListener
(new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
Handler espera3segundos = new Handler();
espera3segundos.postDelayed(new Runnable(){
public void run(){
hideSystemUI();
}
},3000);
}
}
});
}
@Override
protected void onPause() {
super.onPause();
}
private void hideSystemUI() {
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
decorView = this.getWindow().getDecorView();
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE);
}
}
Thanks in advance and sorry for my english. I still learning. Regards.