Phonegap ChildBrowser Plugin: Disable / hide the URL in the location bar, but not the Back / Forward / Exit buttons

Is there a way to hide or disable the URL field in the index? In my case, the device is a tablet computer as a browser for kiosks, so only one URL is allowed.

I fixed this by changing the code in ChildBrowser.java to

private void navigate(String url) {
    InputMethodManager imm = (InputMethodManager)this.ctx.getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);
    if (!url.startsWith("http")) {
        this.webview.loadUrl("http://" + url);
    }
    this.webview.loadUrl("http://www.my-only-allowed-site.example.org");
    this.webview.requestFocus();
}

It works well, but not nice. You can still see the url. I would like to have any of these possible solutions:
1) completely hide the URL field
2) hide the on- screen keyboard when clicking on the URL field
3) set the font color of the URLs to black

Any idea? thanks in advance

+5
source share
2

, url , :

toolbar.addView(back);       //shows the back button
toolbar.addView(forward);    //shows the forward button
//toolbar.addView(edittext); //shows the URL - comment this line out to hide the URL
toolbar.addView(close);      //shows the close button

: oops, , !

+4

Phonegap, , Android WebView?

URL, , . , WebViewClient :

this.webview.setWebViewClient(new WebViewClient() {
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        return false;
    }
});

shouldOverrideUrlLoading(...) -, , Activity Manager, ( ). false , WebView URL-, URL .

EDIT: , , //.

0

All Articles