Hide URL bar in InAppBrowser

Hi All,

How can I hide only the Address bar, not the close button? Or hide toolbar and display Close button only?

I tried using this code:
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', ‘hideurlbar=yes’);

but still it is not working.

Any solution?

Just go to:

C:\Users\Windows 7\YourProject\platforms\android\app\src\main\java\org\apache\cordova\inappbrowser or (your project path).

open inappbrowser.java file and delete or comment the below lines:

toolbar.addView(actionButtonContainer);
toolbar.addView(edittext);

That’s it.

This is really wrong. You should never try to edit your compiled/builded code, resources or whatever (unless you really really really can’t do else)…

Always check the documentation first. Usually 90% of the stuff you can find there…


The answer you’re looking for is the first parameter -> location = false

Location false will not help in any way… It will hide the toolbar, but he wants close button to be displayed.

Thanks, It worked for me.

Is it possible to show close button on the right side? Currently, it is on left side.

Yes you can have a look for that in the java file itself.

add options

{ toolbar: ‘no’, location: ‘no’, zoom: ‘no’ }